diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2017-07-10 13:46:39 +0300 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-10 09:00:18 -0400 |
| commit | 7ea8753b72ed7ddecdcb2db5b223ca920f8155b3 (patch) | |
| tree | 91c736039a7dbf4f1819cfc44c6ecf1fc337d939 /tmk_core/avr.mk | |
| parent | fcd08b8c7d66cf4cf5724b7b2468d3569488114f (diff) | |
| download | qmk_firmware-7ea8753b72ed7ddecdcb2db5b223ca920f8155b3.tar.gz qmk_firmware-7ea8753b72ed7ddecdcb2db5b223ca920f8155b3.zip | |
Don't run dfu-programmer unless specified as a target
This introduces a grep dependency, which I believe we didn't have
before, but it should be available and installed by default on all the
supported systems.
Diffstat (limited to 'tmk_core/avr.mk')
| -rw-r--r-- | tmk_core/avr.mk | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index ccecdb192..a36d219dd 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk | |||
| @@ -115,11 +115,11 @@ dfu: $(BUILD_DIR)/$(TARGET).hex sizeafter | |||
| 115 | echo "Error: Bootloader not found. Trying again in 5s." ;\ | 115 | echo "Error: Bootloader not found. Trying again in 5s." ;\ |
| 116 | sleep 5 ;\ | 116 | sleep 5 ;\ |
| 117 | done | 117 | done |
| 118 | ifneq (, $(findstring 0.7, $(shell $(DFU_PROGRAMMER) --version 2>&1))) | 118 | if $(DFU_PROGRAMMER) --version 2>&1 | grep -q 0.7 ; then\ |
| 119 | $(DFU_PROGRAMMER) $(MCU) erase --force | 119 | $(DFU_PROGRAMMER) $(MCU) erase --force;\ |
| 120 | else | 120 | else\ |
| 121 | $(DFU_PROGRAMMER) $(MCU) erase | 121 | $(DFU_PROGRAMMER) $(MCU) erase;\ |
| 122 | endif | 122 | fi |
| 123 | $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex | 123 | $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex |
| 124 | $(DFU_PROGRAMMER) $(MCU) reset | 124 | $(DFU_PROGRAMMER) $(MCU) reset |
| 125 | 125 | ||
| @@ -135,11 +135,11 @@ flip-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep | |||
| 135 | $(REMOVE) $(BUILD_DIR)/$(TARGET)eep.hex | 135 | $(REMOVE) $(BUILD_DIR)/$(TARGET)eep.hex |
| 136 | 136 | ||
| 137 | dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep | 137 | dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep |
| 138 | ifneq (, $(findstring 0.7, $(shell dfu-programmer --version 2>&1))) | 138 | if $(DFU_PROGRAMMER) --version 2>&1 | grep -q 0.7 ; then\ |
| 139 | $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep | 139 | $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep;\ |
| 140 | else | 140 | else\ |
| 141 | $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep | 141 | $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep;\ |
| 142 | endif | 142 | fi |
| 143 | $(DFU_PROGRAMMER) $(MCU) reset | 143 | $(DFU_PROGRAMMER) $(MCU) reset |
| 144 | 144 | ||
| 145 | # Convert hex to bin. | 145 | # Convert hex to bin. |
