diff options
| author | Danny <nooges@users.noreply.github.com> | 2019-03-15 17:05:50 -0400 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-03-15 14:05:50 -0700 |
| commit | 3c257c1c6e1685a2ce37951c26d13bcb8fad749d (patch) | |
| tree | 3b5636c1488b032e162ac9f98c12c1ca2d9d0a43 /tmk_core | |
| parent | 9c4424ae2cd86002cd2f4140eff7108212ef884e (diff) | |
| download | qmk_firmware-3c257c1c6e1685a2ce37951c26d13bcb8fad749d.tar.gz qmk_firmware-3c257c1c6e1685a2ce37951c26d13bcb8fad749d.zip | |
Add avrdude split EE_HANDS flash commands (#5414)
* Add EEPROM avrdude flashing commands for setting handedness
* Update docs with info on flashing EEPROM handedness files with commands
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/avr.mk | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 79fdf4de5..bf3e269fd 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk | |||
| @@ -223,7 +223,11 @@ define EXEC_AVRDUDE | |||
| 223 | printf "Waiting for $$USB to become writable."; \ | 223 | printf "Waiting for $$USB to become writable."; \ |
| 224 | while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \ | 224 | while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \ |
| 225 | fi; \ | 225 | fi; \ |
| 226 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ | 226 | if [ -z "$(1)" ]; then \ |
| 227 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ | ||
| 228 | else \ | ||
| 229 | avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \ | ||
| 230 | fi \ | ||
| 227 | fi | 231 | fi |
| 228 | endef | 232 | endef |
| 229 | 233 | ||
| @@ -232,9 +236,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | |||
| 232 | 236 | ||
| 233 | avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | 237 | avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware |
| 234 | while true; do \ | 238 | while true; do \ |
| 235 | $(call EXEC_AVRDUDE) ; \ | 239 | $(call EXEC_AVRDUDE) ; \ |
| 236 | done | 240 | done |
| 237 | 241 | ||
| 242 | avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | ||
| 243 | $(call EXEC_AVRDUDE,eeprom-lefthand.eep) | ||
| 244 | |||
| 245 | avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware | ||
| 246 | $(call EXEC_AVRDUDE,eeprom-righthand.eep) | ||
| 247 | |||
| 238 | # Convert hex to bin. | 248 | # Convert hex to bin. |
| 239 | bin: $(BUILD_DIR)/$(TARGET).hex | 249 | bin: $(BUILD_DIR)/$(TARGET).hex |
| 240 | $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin | 250 | $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin |
