From 2f9640a27f03478e6f307038be5142d27e9943ea Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 30 Mar 2021 13:37:41 +0200 Subject: [PATCH] core: wire up flash make target for Teensy 4.x related to https://github.com/kinx-project/kint/issues/5 --- platforms/chibios/IC_TEENSY_4_1/board/board.mk | 1 + platforms/chibios/IC_TEENSY_4_1/rules.mk | 1 + tmk_core/chibios.mk | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 platforms/chibios/IC_TEENSY_4_1/board/board.mk create mode 100644 platforms/chibios/IC_TEENSY_4_1/rules.mk diff --git a/platforms/chibios/IC_TEENSY_4_1/board/board.mk b/platforms/chibios/IC_TEENSY_4_1/board/board.mk new file mode 100644 index 000000000000..bc242ac3c5a2 --- /dev/null +++ b/platforms/chibios/IC_TEENSY_4_1/board/board.mk @@ -0,0 +1 @@ +include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_4_1/board.mk diff --git a/platforms/chibios/IC_TEENSY_4_1/rules.mk b/platforms/chibios/IC_TEENSY_4_1/rules.mk new file mode 100644 index 000000000000..0c62d209c5b6 --- /dev/null +++ b/platforms/chibios/IC_TEENSY_4_1/rules.mk @@ -0,0 +1 @@ +TEENSY_LOADER_CLI_MCU = imxrt1062 diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index cdf9ba6495c0..cfdfb2e3f5e2 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -385,8 +385,10 @@ ifndef TEENSY_LOADER_CLI endif endif +TEENSY_LOADER_CLI_MCU ?= $(MCU_LDSCRIPT) + define EXEC_TEENSY - $(TEENSY_LOADER_CLI) -mmcu=$(MCU_LDSCRIPT) -w -v $(BUILD_DIR)/$(TARGET).hex + $(TEENSY_LOADER_CLI) -mmcu=$(TEENSY_LOADER_CLI_MCU) -w -v $(BUILD_DIR)/$(TARGET).hex endef teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter @@ -403,6 +405,8 @@ else ifeq ($(strip $(BOOTLOADER)),kiibohd) $(call EXEC_DFU_UTIL) else ifeq ($(strip $(MCU_FAMILY)),KINETIS) $(call EXEC_TEENSY) +else ifeq ($(strip $(MCU_FAMILY)),MIMXRT1062) + $(call EXEC_TEENSY) else ifeq ($(strip $(MCU_FAMILY)),STM32) $(call EXEC_DFU_UTIL) else