Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate :program logic to :flash #8631

Merged
merged 1 commit into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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