From 268269beafa02510b676243630a1c40332e669c0 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Tue, 6 Aug 2019 19:39:11 -0400 Subject: 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. --- Makefile | 7 ++++--- 1 file 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 $< -- cgit v1.2.3