From 6ee823a821d9c89a67c53f65ecf4d745223694a0 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Sun, 26 Feb 2017 10:16:24 -0500 Subject: [PATCH] Add rule for flashing microcontroller using avrdude --- keyboards/handwired/magicforce68/rules.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 711759917..e897ef252 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -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