Add rule for flashing microcontroller using avrdude
This commit is contained in:
parent
1023a47be6
commit
6ee823a821
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue