]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add avrdude target
authorNic Aitch <nic@nicinabox.com>
Thu, 26 Jan 2017 15:31:27 +0000 (09:31 -0600)
committerNic Aitch <nic@nicinabox.com>
Thu, 26 Jan 2017 15:31:27 +0000 (09:31 -0600)
keyboards/lets_split/rules.mk

index 1aee5313c1ee122fb0feebc44dc52caef52651b0..0dc5491302e909d0d29451cbd47b6646fa3a9326 100644 (file)
@@ -73,3 +73,13 @@ USE_I2C ?= yes
 SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
 
 CUSTOM_MATRIX = yes
+
+avrdude: build
+       ls /dev/tty* > /tmp/1; \
+       echo "Reset your Pro Micro then hit any key to continue..."; \
+       read -n 1 -s; \
+       ls /dev/tty* > /tmp/2; \
+       USB=`diff /tmp/1 /tmp/2 | grep '>' | sed -e 's/> //'`; \
+       avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
+.PHONY: avrdude