summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-04-01 13:27:16 +0100
committerGitHub <noreply@github.com>2020-04-01 13:27:16 +0100
commitb6a09502c626c3a94a859ab0a61d41a41835d611 (patch)
treecd4d558c3b5f70b541c57b2b9c174f7a34faebd3 /tmk_core
parent19621354189066417c42ac840dfc237bf790f09b (diff)
Migrate :program logic to :flash (#8631)
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/avr.mk8
-rw-r--r--tmk_core/chibios.mk4
2 files changed, 6 insertions, 6 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 2c65a34aa3..a8d01a9e8c 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -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
@@ -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)
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index f3b4b399cc..6bacabbbf3 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -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)