From e5acff0312ec74ce6ced2a3f357a25ec8ff5d4db Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 8 Sep 2016 13:52:59 +0900 Subject: [PATCH] core: 'make dfu' waits for bootloader to start jackhumbert/qmk_firmware@0b8c448 --- tmk_core/rules.mk | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.46.2