Makefile: use dfu-suffix to add the usb id to the firmware

This commit is contained in:
Nicolas Reinecke
2016-01-22 10:38:30 +01:00
parent 84432e8817
commit 41a95426e9
+7 -2
View File
@@ -208,12 +208,17 @@ showsize: build
# Flash the device
#
btburn: build showsize
btburn: build showsize $(TARGET).dfu
#change this to your device
printf "bootloader\r" > `ls /dev/cu.usbmodem*` || true
printf "bootloader\r" > `ls /dev/ttyACM*` || true
sleep 1
dfu-util -a 0 -d 0483:df11 -s 0x08010000:leave -D $(TARGET).bin
dfu-util -a 0 -s 0x08010000:leave -D $(TARGET).dfu
# Create a DFU file from bin file
%.dfu: %.bin
@cp $< $@
dfu-suffix -v 0483 -p df11 -a $@
# Target: clean project
#