Properly always copy firmware

This finishes fixing #2314, which mostly copies the firmware when compiling.
However, it misses `:teensy`, `:avrdude` and most importantly, `:production`
This commit is contained in:
U-LANDSRAAD\drashna 2018-03-29 12:26:09 -07:00 committed by Jack Humbert
parent fb34fdbbc9
commit c2bec5b3f0

View file

@ -124,7 +124,7 @@ qmk: $(BUILD_DIR)/$(TARGET).hex
program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size
$(PROGRAM_CMD)
teensy: $(BUILD_DIR)/$(TARGET).hex check-size
teensy: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
$(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
BATCHISP ?= batchisp
@ -169,7 +169,7 @@ dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
fi
$(DFU_PROGRAMMER) $(MCU) reset
avrdude: $(BUILD_DIR)/$(TARGET).hex check-size
avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
if $(GREP) -q -s Microsoft /proc/version; then \
echo 'ERROR: AVR flashing cannot be automated within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'; \
else \
@ -264,7 +264,7 @@ bootloader:
echo -e "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex"
cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex
production: $(BUILD_DIR)/$(TARGET).hex bootloader
production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware
@cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex
@cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex
echo "File sizes:"