diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2018-01-28 11:11:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-28 11:11:28 -0800 |
commit | 9bfaf66792310fae2d525633b280b354babca026 (patch) | |
tree | 16e801302a9adfa6fcacb3ab16d1244b52ca0200 | |
parent | f0f991dd89733b7dc9ca54042923c031b3b3ca73 (diff) | |
download | qmk_firmware-9bfaf66792310fae2d525633b280b354babca026.tar.gz qmk_firmware-9bfaf66792310fae2d525633b280b354babca026.zip |
Always copy the firmware file to the root qmk_firmware directory (#2314)
* Always copy the firmware file to the root qmk_firmware directory
* remove circular dependency
-rw-r--r-- | build_keyboard.mk | 4 | ||||
-rw-r--r-- | tmk_core/avr.mk | 2 | ||||
-rw-r--r-- | tmk_core/chibios.mk | 2 | ||||
-rw-r--r-- | tmk_core/rules.mk | 8 |
4 files changed, 9 insertions, 7 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk index cbdaaa010..bee8fcc87 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk | |||
@@ -113,9 +113,11 @@ endif | |||
113 | 113 | ||
114 | # We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA | 114 | # We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA |
115 | ifdef MCU_FAMILY | 115 | ifdef MCU_FAMILY |
116 | FIRMWARE_FORMAT=bin | ||
116 | PLATFORM=CHIBIOS | 117 | PLATFORM=CHIBIOS |
117 | else | 118 | else |
118 | PLATFORM=AVR | 119 | PLATFORM=AVR |
120 | FIRMWARE_FORMAT=hex | ||
119 | endif | 121 | endif |
120 | 122 | ||
121 | ifeq ($(PLATFORM),CHIBIOS) | 123 | ifeq ($(PLATFORM),CHIBIOS) |
@@ -270,7 +272,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) | |||
270 | all: build check-size | 272 | all: build check-size |
271 | 273 | ||
272 | # Change the build target to build a HEX file or a library. | 274 | # Change the build target to build a HEX file or a library. |
273 | build: elf cphex | 275 | build: elf cpfirmware |
274 | #build: elf hex eep lss sym | 276 | #build: elf hex eep lss sym |
275 | #build: lib | 277 | #build: lib |
276 | 278 | ||
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 30d4fe26e..24722736e 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk | |||
@@ -136,7 +136,7 @@ flip: $(BUILD_DIR)/$(TARGET).hex check-size | |||
136 | 136 | ||
137 | DFU_PROGRAMMER ?= dfu-programmer | 137 | DFU_PROGRAMMER ?= dfu-programmer |
138 | 138 | ||
139 | dfu: $(BUILD_DIR)/$(TARGET).hex check-size | 139 | dfu: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size |
140 | until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\ | 140 | until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\ |
141 | echo "Error: Bootloader not found. Trying again in 5s." ;\ | 141 | echo "Error: Bootloader not found. Trying again in 5s." ;\ |
142 | sleep 5 ;\ | 142 | sleep 5 ;\ |
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index cb0482d75..df9fa8498 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk | |||
@@ -220,7 +220,7 @@ qmk: $(BUILD_DIR)/$(TARGET).bin | |||
220 | zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json | 220 | zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json |
221 | printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk | 221 | printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk |
222 | 222 | ||
223 | dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter | 223 | dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter |
224 | $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin | 224 | $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin |
225 | 225 | ||
226 | bin: $(BUILD_DIR)/$(TARGET).bin sizeafter | 226 | bin: $(BUILD_DIR)/$(TARGET).bin sizeafter |
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 920a7f6ad..7a282cacc 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
@@ -216,9 +216,9 @@ MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@) | |||
216 | 216 | ||
217 | elf: $(BUILD_DIR)/$(TARGET).elf | 217 | elf: $(BUILD_DIR)/$(TARGET).elf |
218 | hex: $(BUILD_DIR)/$(TARGET).hex | 218 | hex: $(BUILD_DIR)/$(TARGET).hex |
219 | cphex: hex | 219 | cpfirmware: $(FIRMWARE_FORMAT) |
220 | $(SILENT) || printf "Copying $(TARGET).hex to qmk_firmware folder" | $(AWK_CMD) | 220 | $(SILENT) || printf "Copying $(TARGET).$(FIRMWARE_FORMAT) to qmk_firmware folder" | $(AWK_CMD) |
221 | $(COPY) $(BUILD_DIR)/$(TARGET).hex $(TARGET).hex && $(PRINT_OK) | 221 | $(COPY) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT) $(TARGET).$(FIRMWARE_FORMAT) && $(PRINT_OK) |
222 | eep: $(BUILD_DIR)/$(TARGET).eep | 222 | eep: $(BUILD_DIR)/$(TARGET).eep |
223 | lss: $(BUILD_DIR)/$(TARGET).lss | 223 | lss: $(BUILD_DIR)/$(TARGET).lss |
224 | sym: $(BUILD_DIR)/$(TARGET).sym | 224 | sym: $(BUILD_DIR)/$(TARGET).sym |
@@ -392,4 +392,4 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null))) | |||
392 | .PHONY : all finish sizebefore sizeafter qmkversion \ | 392 | .PHONY : all finish sizebefore sizeafter qmkversion \ |
393 | gccversion build elf hex eep lss sym coff extcoff \ | 393 | gccversion build elf hex eep lss sym coff extcoff \ |
394 | clean clean_list debug gdb-config show_path \ | 394 | clean clean_list debug gdb-config show_path \ |
395 | program teensy dfu flip dfu-ee flip-ee dfu-start \ No newline at end of file | 395 | program teensy dfu flip dfu-ee flip-ee dfu-start |