Skip to content

Commit

Permalink
Align usbasp flashing behaviour (qmk#14928)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored and ptrxyz committed Nov 6, 2021
1 parent d8b516e commit 75235d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions platforms/avr/flash.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 75235d6

Please sign in to comment.