Add rule for flashing microcontroller using avrdude

pull/1138/head
Danny Nguyen 8 years ago
parent 1023a47be6
commit 6ee823a821

@ -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

Loading…
Cancel
Save