Skip to content

Commit 09aa3b1

Browse files
zvecrfdidron
authored andcommittedJun 12, 2020
Migrate :program logic to :flash (qmk#8631)
1 parent 626da49 commit 09aa3b1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎tmk_core/avr.mk

+3-5
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ ifndef TEENSY_LOADER_CLI
9898
endif
9999
endif
100100

101-
# Program the device.
102-
program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep check-size
103-
$(PROGRAM_CMD)
104-
105101
define EXEC_TEENSY
106102
$(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex
107103
endef
@@ -314,7 +310,9 @@ production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware
314310
$(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex
315311

316312
flash: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware
317-
ifeq ($(strip $(BOOTLOADER)), caterina)
313+
ifneq ($(strip $(PROGRAM_CMD)),)
314+
$(PROGRAM_CMD)
315+
else ifeq ($(strip $(BOOTLOADER)), caterina)
318316
$(call EXEC_AVRDUDE)
319317
else ifeq ($(strip $(BOOTLOADER)), halfkay)
320318
$(call EXEC_TEENSY)

‎tmk_core/chibios.mk

+3-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter
326326

327327

328328
flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter
329-
ifeq ($(strip $(BOOTLOADER)),dfu)
329+
ifneq ($(strip $(PROGRAM_CMD)),)
330+
$(PROGRAM_CMD)
331+
else ifeq ($(strip $(BOOTLOADER)),dfu)
330332
$(call EXEC_DFU_UTIL)
331333
else ifeq ($(strip $(MCU_FAMILY)),KINETIS)
332334
$(call EXEC_TEENSY)

0 commit comments

Comments
 (0)
Please sign in to comment.