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
This commit is contained in:
parent
f0f991dd89
commit
9bfaf66792
@ -113,9 +113,11 @@ endif
|
|||||||
|
|
||||||
# We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA
|
# We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA
|
||||||
ifdef MCU_FAMILY
|
ifdef MCU_FAMILY
|
||||||
|
FIRMWARE_FORMAT=bin
|
||||||
PLATFORM=CHIBIOS
|
PLATFORM=CHIBIOS
|
||||||
else
|
else
|
||||||
PLATFORM=AVR
|
PLATFORM=AVR
|
||||||
|
FIRMWARE_FORMAT=hex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PLATFORM),CHIBIOS)
|
ifeq ($(PLATFORM),CHIBIOS)
|
||||||
@ -270,7 +272,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
|||||||
all: build check-size
|
all: build check-size
|
||||||
|
|
||||||
# Change the build target to build a HEX file or a library.
|
# Change the build target to build a HEX file or a library.
|
||||||
build: elf cphex
|
build: elf cpfirmware
|
||||||
#build: elf hex eep lss sym
|
#build: elf hex eep lss sym
|
||||||
#build: lib
|
#build: lib
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ flip: $(BUILD_DIR)/$(TARGET).hex check-size
|
|||||||
|
|
||||||
DFU_PROGRAMMER ?= dfu-programmer
|
DFU_PROGRAMMER ?= dfu-programmer
|
||||||
|
|
||||||
dfu: $(BUILD_DIR)/$(TARGET).hex check-size
|
dfu: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size
|
||||||
until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\
|
until $(DFU_PROGRAMMER) $(MCU) get bootloader-version; do\
|
||||||
echo "Error: Bootloader not found. Trying again in 5s." ;\
|
echo "Error: Bootloader not found. Trying again in 5s." ;\
|
||||||
sleep 5 ;\
|
sleep 5 ;\
|
||||||
|
@ -220,7 +220,7 @@ qmk: $(BUILD_DIR)/$(TARGET).bin
|
|||||||
zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json
|
zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json
|
||||||
printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk
|
printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk
|
||||||
|
|
||||||
dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter
|
dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
|
||||||
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
|
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
|
||||||
|
|
||||||
bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
|
bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
|
||||||
|
@ -216,9 +216,9 @@ MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@)
|
|||||||
|
|
||||||
elf: $(BUILD_DIR)/$(TARGET).elf
|
elf: $(BUILD_DIR)/$(TARGET).elf
|
||||||
hex: $(BUILD_DIR)/$(TARGET).hex
|
hex: $(BUILD_DIR)/$(TARGET).hex
|
||||||
cphex: hex
|
cpfirmware: $(FIRMWARE_FORMAT)
|
||||||
$(SILENT) || printf "Copying $(TARGET).hex to qmk_firmware folder" | $(AWK_CMD)
|
$(SILENT) || printf "Copying $(TARGET).$(FIRMWARE_FORMAT) to qmk_firmware folder" | $(AWK_CMD)
|
||||||
$(COPY) $(BUILD_DIR)/$(TARGET).hex $(TARGET).hex && $(PRINT_OK)
|
$(COPY) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT) $(TARGET).$(FIRMWARE_FORMAT) && $(PRINT_OK)
|
||||||
eep: $(BUILD_DIR)/$(TARGET).eep
|
eep: $(BUILD_DIR)/$(TARGET).eep
|
||||||
lss: $(BUILD_DIR)/$(TARGET).lss
|
lss: $(BUILD_DIR)/$(TARGET).lss
|
||||||
sym: $(BUILD_DIR)/$(TARGET).sym
|
sym: $(BUILD_DIR)/$(TARGET).sym
|
||||||
|
Loading…
Reference in New Issue
Block a user