Migrate :program logic to :flash (#8631)

This commit is contained in:
Joel Challis 2020-04-01 13:27:16 +01:00 committed by GitHub
parent 1962135418
commit b6a09502c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -98,10 +98,6 @@ ifndef TEENSY_LOADER_CLI
endif endif
endif endif
# Program the device.
program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size
$(PROGRAM_CMD)
define EXEC_TEENSY define EXEC_TEENSY
$(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex $(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
endef endef
@ -314,7 +310,9 @@ production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware
$(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex
flash: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware flash: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
ifeq ($(strip $(BOOTLOADER)), caterina) ifneq ($(strip $(PROGRAM_CMD)),)
$(PROGRAM_CMD)
else ifeq ($(strip $(BOOTLOADER)), caterina)
$(call EXEC_AVRDUDE) $(call EXEC_AVRDUDE)
else ifeq ($(strip $(BOOTLOADER)), halfkay) else ifeq ($(strip $(BOOTLOADER)), halfkay)
$(call EXEC_TEENSY) $(call EXEC_TEENSY)

View file

@ -327,7 +327,9 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
ifeq ($(strip $(BOOTLOADER)),dfu) ifneq ($(strip $(PROGRAM_CMD)),)
$(PROGRAM_CMD)
else ifeq ($(strip $(BOOTLOADER)),dfu)
$(call EXEC_DFU_UTIL) $(call EXEC_DFU_UTIL)
else ifeq ($(strip $(MCU_FAMILY)),KINETIS) else ifeq ($(strip $(MCU_FAMILY)),KINETIS)
$(call EXEC_TEENSY) $(call EXEC_TEENSY)