mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-13 23:44:54 +00:00
Make DFU wait for bootloader
Added a loop for waiting for the keyboard to be put in bootloader mode, rather than failing out. Makes building keymaps easier.
This commit is contained in:
parent
9ecf9073b9
commit
0b8c448b30
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ flip: $(BUILD_DIR)/$(TARGET).hex
|
||||||
batchisp -hardware usb -device $(MCU) -operation start reset 0
|
batchisp -hardware usb -device $(MCU) -operation start reset 0
|
||||||
|
|
||||||
dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter
|
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)))
|
ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1)))
|
||||||
dfu-programmer $(MCU) erase --force
|
dfu-programmer $(MCU) erase --force
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue