瀏覽代碼

Merge pull request #1036 from nicinabox/lets-split-improvements

Lets Split flashing improvements
Jack Humbert 8 年之前
父節點
當前提交
b5159c964a
共有 2 個文件被更改,包括 14 次插入0 次删除
  1. 4 0
      keyboards/lets_split/readme.md
  2. 10 0
      keyboards/lets_split/rules.mk

+ 4 - 0
keyboards/lets_split/readme.md

@@ -74,6 +74,10 @@ not be very difficult to adapt it to support more if required.
 Flashing
 Flashing
 --------
 --------
 
 
+From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing.
+
+Example: `make rev2-serial-avrdude`
+
 If you define `EE_HANDS` in your `config.h`, you will need to set the
 If you define `EE_HANDS` in your `config.h`, you will need to set the
 EEPROM for the left and right halves. The EEPROM is used to store whether the
 EEPROM for the left and right halves. The EEPROM is used to store whether the
 half is left handed or right handed. This makes it so that the same firmware
 half is left handed or right handed. This makes it so that the same firmware

+ 10 - 0
keyboards/lets_split/rules.mk

@@ -73,3 +73,13 @@ USE_I2C ?= yes
 SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
 SLEEP_LED_ENABLE ?= no    # Breathing sleep LED during USB suspend
 
 
 CUSTOM_MATRIX = yes
 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