summaryrefslogtreecommitdiff
path: root/tmk_core/avr.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-04-01 13:27:16 +0100
committerFlorian Didron <fdidron@users.noreply.github.com>2020-06-12 17:00:27 +0900
commit09aa3b15f4069578c4d4a43c12598caea7b7e366 (patch)
tree7d0983006baa999258b0e304d16d73fa23441789 /tmk_core/avr.mk
parent626da49ee04a67dd96299a0310b708893fe93b2c (diff)
Migrate :program logic to :flash (#8631)
Diffstat (limited to 'tmk_core/avr.mk')
-rw-r--r--tmk_core/avr.mk8
1 files changed, 3 insertions, 5 deletions
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index c2853ac410..9a619f89b3 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)