diff options
author | Joel Challis <git@zvecr.com> | 2021-10-24 14:18:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-24 14:18:57 +0100 |
commit | 19b9e406dc516da79d96ad72fe4bc20e3ea4a773 (patch) | |
tree | 5fe435e95aaddb4e9396d7c15b5161984086255e /platforms/avr | |
parent | b827daf13d236b837215d8cff2d19e851ad353ea (diff) | |
download | qmk_firmware-19b9e406dc516da79d96ad72fe4bc20e3ea4a773.tar.gz qmk_firmware-19b9e406dc516da79d96ad72fe4bc20e3ea4a773.zip |
Align usbasp flashing behaviour (#14928)
Diffstat (limited to 'platforms/avr')
-rw-r--r-- | platforms/avr/flash.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk index 985cb60e52..6d50e72534 100644 --- a/platforms/avr/flash.mk +++ b/platforms/avr/flash.mk @@ -130,6 +130,15 @@ avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware $(call EXEC_AVRDUDE,eeprom-righthand.eep) define EXEC_USBASP + if $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | grep -q "could not find USB device with"; then \ + printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + until $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | (! grep -q "could not find USB device with"); do\ + printf "." ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + done ;\ + printf "\n" ;\ + fi $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp -U flash:w:$(BUILD_DIR)/$(TARGET).hex endef |