aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/avr.mk
diff options
context:
space:
mode:
authorBalz Guenat <balz.guenat@gmail.com>2017-08-07 21:54:06 +0200
committerBalz Guenat <balz.guenat@gmail.com>2017-08-07 21:54:06 +0200
commitd18df8ef7a7e0528a29fdc96d4843ace54605121 (patch)
tree44f75b9bccd3efa130d622736726a5f1c83531f6 /tmk_core/avr.mk
parent308bec28bb76f4305d0f084252d7cf207f1b3d83 (diff)
parent933701c2129c0c585ecd8ba37c41b091a7dc687f (diff)
downloadfirmware-d18df8ef7a7e0528a29fdc96d4843ace54605121.tar.gz
firmware-d18df8ef7a7e0528a29fdc96d4843ace54605121.tar.bz2
firmware-d18df8ef7a7e0528a29fdc96d4843ace54605121.zip
Merge remote-tracking branch 'upstream/master' into bananasplit
# Conflicts: # keyboards/bananasplit/Makefile # keyboards/bananasplit/bananasplit.c # keyboards/bananasplit/bananasplit.h # keyboards/bananasplit/config.h # keyboards/bananasplit/keymaps/default/keymap.c # keyboards/bananasplit/rules.mk
Diffstat (limited to 'tmk_core/avr.mk')
-rw-r--r--tmk_core/avr.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 4af34ba57..0d0eec3bf 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -144,6 +144,20 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
fi
$(DFU_PROGRAMMER) $(MCU) reset
+avrdude: $(BUILD_DIR)/$(TARGET).hex
+ ls /dev/tty* > /tmp/1; \
+ echo "Detecting Pro Micro port, reset your Pro Micro now.\c"; \
+ while [ -z $$USB ]; do \
+ sleep 1; \
+ echo ".\c"; \
+ ls /dev/tty* > /tmp/2; \
+ USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \
+ done; \
+ echo ""; \
+ echo "Detected Pro Micro port at $$USB"; \
+ sleep 1; \
+ avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex
+
# Convert hex to bin.
flashbin: $(BUILD_DIR)/$(TARGET).hex
$(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin