From: Jun Wako Date: Thu, 26 Mar 2015 06:09:28 +0000 (+0900) Subject: Fix for dfu-programmer 0.7 #182 X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=2b7d217ebb44934dd8554f3505ab656106649a11;p=max%2Ftmk_keyboard.git Fix for dfu-programmer 0.7 #182 --- diff --git a/rules.mk b/rules.mk index 83c9da5f..d0675663 100644 --- a/rules.mk +++ b/rules.mk @@ -419,6 +419,11 @@ flip: $(TARGET).hex batchisp -hardware usb -device $(MCU) -operation start reset 0 dfu: $(TARGET).hex +ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) + dfu-programmer $(MCU) erase --force +else + dfu-programmer $(MCU) erase +endif dfu-programmer $(MCU) erase dfu-programmer $(MCU) flash $(TARGET).hex dfu-programmer $(MCU) reset