1
0
Fork 0

Add rule for flashing microcontroller using avrdude

This commit is contained in:
Danny Nguyen 2017-02-26 10:16:24 -05:00
parent 1023a47be6
commit 6ee823a821

View file

@ -70,4 +70,14 @@ ifndef QUANTUM_DIR
include ../../../Makefile include ../../../Makefile
endif endif
avrdude: build
ls /dev/tty* > /tmp/1; \
echo "Reset your Pro Micro now"; \
while [[ -z $$USB ]]; do \
sleep 1; \
ls /dev/tty* > /tmp/2; \
USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
done; \
avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
.PHONY: avrdude