From ac5e6b6a3bfad12ab7d9786a18fcc90f8bf4caf7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 3 Jul 2022 00:12:45 +1000 Subject: Tentative Teensy 3.5 support (#14420) * Tentative Teensy 3.5 support * Set firmware format to .hex for ARM Teensys * Got to "device descriptor failed" by comparing with Teensy 3.6 code * Drop down to 96MHz... * Bump back up to 120MHz --- builddefs/bootloader.mk | 4 ++-- builddefs/mcu_selection.mk | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index 3d4c03b01c..51e9b7d558 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -105,8 +105,8 @@ ifeq ($(strip $(BOOTLOADER)), halfkay) ifeq ($(strip $(MCU)), at90usb1286) BOOTLOADER_SIZE = 1024 endif - # Teensy LC, 3.x - ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK66FX1M0)) + # Teensy LC, 3.0, 3.1/2, 3.5, 3.6 + ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK64FX512 MK66FX1M0)) FIRMWARE_FORMAT = hex endif endif diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk index 135f663c14..7528aa6842 100644 --- a/builddefs/mcu_selection.mk +++ b/builddefs/mcu_selection.mk @@ -87,6 +87,33 @@ ifneq ($(findstring MK20DX256, $(MCU)),) BOARD ?= PJRC_TEENSY_3_1 endif +ifneq ($(findstring MK64FX512, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = K60x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK64FX512 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= k60x + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3_5 +endif + ifneq ($(findstring MK66FX1M0, $(MCU)),) # Cortex version MCU = cortex-m4 -- cgit v1.2.3