Skip to content

Commit 56b0d3a

Browse files
committed
env: insert wait after switching to dfu
1 parent ba7d358 commit 56b0d3a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ endif
8181
# Project, sources and paths
8282
#
8383

84+
# Dvice node to flash
85+
DEVICE = /dev/cu.usbmodem401
86+
#DEVICE = /dev/ttyACM0
87+
8488
# Define project name here
8589
PROJECT = ch
8690

@@ -225,6 +229,4 @@ flash: build/ch.bin
225229
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/ch.bin
226230

227231
dfu:
228-
-@printf "reset dfu\r" >/dev/cu.usbmodem401
229-
230-
232+
-printf "reset dfu\r" >$(DEVICE) && sleep 1

0 commit comments

Comments
 (0)