Skip to content

Commit

Permalink
Migrate :program logic to :flash (qmk#8631)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored and lorenzoernesto committed May 15, 2020
1 parent cdab228 commit c798adf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 3 additions & 5 deletions tmk_core/avr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ ifndef TEENSY_LOADER_CLI
endif
endif

# Program the device.
program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size
$(PROGRAM_CMD)

define EXEC_TEENSY
$(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
endef
Expand Down Expand Up @@ -314,7 +310,9 @@ production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware
$(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex

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)
else ifeq ($(strip $(BOOTLOADER)), halfkay)
$(call EXEC_TEENSY)
Expand Down
4 changes: 3 additions & 1 deletion tmk_core/chibios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ bin: $(BUILD_DIR)/$(TARGET).bin 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)
else ifeq ($(strip $(MCU_FAMILY)),KINETIS)
$(call EXEC_TEENSY)
Expand Down

0 comments on commit c798adf

Please sign in to comment.