Add rule for flashing microcontroller using avrdude

master
Danny Nguyen 2017-02-26 10:16:24 -05:00
parent 1023a47be6
commit 6ee823a821
1 changed files with 10 additions and 0 deletions

View File

@ -70,4 +70,14 @@ ifndef QUANTUM_DIR
include ../../../Makefile
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