add 'mavrdude' target into tmk_core/avr.mk (#3986)
* add 'mavrdude' target into tmk_core/avr.mk I made it a little convenient when writing the same binary to multiple Pro Micro. * rename target name 'mavrdude' to 'avrdude-loop' * modify docs/flashing.md about avrdude-loop * mdify docs/flashing.md again * modifi docs/flashing.md 3rdmaster
parent
edeace279b
commit
baebbc0967
|
@ -78,6 +78,12 @@ or
|
||||||
|
|
||||||
make <keyboard>:<keymap>:avrdude
|
make <keyboard>:<keymap>:avrdude
|
||||||
|
|
||||||
|
or if you want to flash multiple boards, use the following command
|
||||||
|
|
||||||
|
make <keyboard>:<keymap>:avrdude-loop
|
||||||
|
|
||||||
|
When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
|
||||||
|
|
||||||
## Halfkay
|
## Halfkay
|
||||||
|
|
||||||
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
|
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
|
||||||
|
|
|
@ -169,7 +169,8 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
|
||||||
fi
|
fi
|
||||||
$(DFU_PROGRAMMER) $(MCU) reset
|
$(DFU_PROGRAMMER) $(MCU) reset
|
||||||
|
|
||||||
avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
|
define EXEC_AVRDUDE
|
||||||
|
USB= ;\
|
||||||
if $(GREP) -q -s Microsoft /proc/version; then \
|
if $(GREP) -q -s Microsoft /proc/version; then \
|
||||||
echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \
|
echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \
|
||||||
else \
|
else \
|
||||||
|
@ -191,6 +192,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
|
||||||
sleep 1; \
|
sleep 1; \
|
||||||
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
|
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \
|
||||||
fi
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
|
||||||
|
$(call EXEC_AVRDUDE)
|
||||||
|
|
||||||
|
avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
|
||||||
|
while true; do \
|
||||||
|
$(call EXEC_AVRDUDE) ; \
|
||||||
|
done
|
||||||
|
|
||||||
# Convert hex to bin.
|
# Convert hex to bin.
|
||||||
bin: $(BUILD_DIR)/$(TARGET).hex
|
bin: $(BUILD_DIR)/$(TARGET).hex
|
||||||
|
|
Loading…
Reference in New Issue