diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-07-21 20:57:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-21 20:57:32 -0400 |
commit | fc4ab870f545ec2d8722f1ba7dacd229ef1c033c (patch) | |
tree | ebb972c1526a929ac6d216de1ea21083366fc548 | |
parent | 940358ed4f5cdb9ff6b6a21e2fd9b3f0c35a4347 (diff) | |
parent | 0b8c448b300da233de8b8d4fcdb359ec0679a513 (diff) | |
download | qmk_firmware-fc4ab870f545ec2d8722f1ba7dacd229ef1c033c.tar.gz qmk_firmware-fc4ab870f545ec2d8722f1ba7dacd229ef1c033c.zip |
Merge pull request #521 from exiva/makefile-wait
Make DFU wait for bootloader
-rw-r--r-- | tmk_core/avr.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 3bf2b34f88..6c03e1650e 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -107,6 +107,10 @@ flip: $(BUILD_DIR)/$(TARGET).hex batchisp -hardware usb -device $(MCU) -operation start reset 0 dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter + until dfu-programmer $(MCU) get bootloader-version; do\ + echo "Error: Bootloader not found. Trying again in 5s." ;\ + sleep 5 ;\ + done ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) dfu-programmer $(MCU) erase --force else |