Ver código fonte

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

Lets Split flashing improvements
Jack Humbert 8 anos atrás
pai
commit
b5159c964a
2 arquivos alterados com 14 adições e 0 exclusões
  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
 --------
 
+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
 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

+ 10 - 0
keyboards/lets_split/rules.mk

@@ -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