From 41a95426e9f0d2af3bd2eeedcd62379208806ebc Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Wed, 20 Jan 2016 18:41:29 +0100 Subject: [PATCH] Makefile: use dfu-suffix to add the usb id to the firmware --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 702c221e..590f3e58 100644 --- a/Makefile +++ b/Makefile @@ -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 #