summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-06 19:39:11 -0400
committerBrian Cully <bjc@kublai.com>2019-08-06 19:39:11 -0400
commit268269beafa02510b676243630a1c40332e669c0 (patch)
tree4433f279ec3de3bc2759bbc263c343f61ec157f9
parent146e3c4c66c05de21409a63cacab9e8401bb1959 (diff)
downloadbleusb-268269beafa02510b676243630a1c40332e669c0.tar.gz
bleusb-268269beafa02510b676243630a1c40332e669c0.zip
Simplify flashing.
Needs my `feather-cmd` stuff and Arduino sketch, but now I don't have to double tap the button to put the Trinket into DFU.
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index a78d29f..2ef73a4 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,6 @@ USBVID = 239a
USBPID = '001e|801e'
BOSSAC = bossac
-SERIAL = $(shell ./find-serial-port $(USBVID) $(USBPID) || echo 'cant-find-serial-port')
OFFSET = 0x2000
OBJCOPY = arm-none-eabi-objcopy
@@ -35,8 +34,10 @@ cargo-build:
$(OUTDIR)/$(APP): cargo-build
-flash: $(APP).bin $(SERIAL)
- $(BOSSAC) -R -e -w -v -o$(OFFSET) -p$(SERIAL) $<
+flash: $(APP).bin
+ feather-cmd dfu
+ sleep 2
+ $(BOSSAC) -R -e -w -v -o$(OFFSET) -p`./find-serial-port $(USBVID) $(USBPID)` $<
qemu: $(OUTDIR)/$(APP)
qemu-system-arm -d in_asm,int,exec,cpu,guest_errors,unimp -pidfile qemu.pid -cpu cortex-m0 -machine lm3s6965evb -nographic -semihosting-config enable=on,target=native -s -S -kernel $<