From: tmk Date: Thu, 8 Sep 2016 04:52:59 +0000 (+0900) Subject: core: 'make dfu' waits for bootloader to start X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=e5acff0312ec74ce6ced2a3f357a25ec8ff5d4db;p=max%2Ftmk_keyboard.git core: 'make dfu' waits for bootloader to start jackhumbert/qmk_firmware@0b8c448 --- diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 0ae84d91..a0a7c3e5 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -420,6 +420,10 @@ flip: $(TARGET).hex batchisp -hardware usb -device $(MCU) -operation start reset 0 dfu: $(TARGET).hex + @until dfu-programmer atmega32u4 get bootloader-version > /dev/null 2>&1; do \ + echo -n "."; \ + sleep 1; \ + done ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) dfu-programmer $(MCU) erase --force else