summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-02-21 17:12:15 +1100
committerDrashna Jael're <drashna@live.com>2020-03-26 00:42:12 -0700
commit87ece02fa956119b73b4c64153403719e8baa3e1 (patch)
tree41c44463607ae97ca33e600d4dc81cd7a1e5cd38
parent583bd29a60abf3e6b94a258e1f7dfa2e63a47bdc (diff)
Add Arm Teensys to mcu_selection.mk (#8026)
* Add Arm Teensys to mcu_selection.mk * Roll back halfkeyboard keymap changes * Remove extra newline
-rw-r--r--quantum/mcu_selection.mk82
1 files changed, 82 insertions, 0 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index afcc59229d..84a9f3bcc6 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -1,3 +1,85 @@
+ifneq ($(findstring MKL26Z64, $(MCU)),)
+ # Cortex version
+ MCU = cortex-m0plus
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 6
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = KINETIS
+ MCU_SERIES = KL2x
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ # - NOTE: a custom ld script is needed for EEPROM on Teensy LC
+ MCU_LDSCRIPT ?= MKL26Z64
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= kl2x
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= PJRC_TEENSY_LC
+endif
+
+ifneq ($(findstring MK20DX128, $(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
+ # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = KINETIS
+ MCU_SERIES = K20x
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= MK20DX128
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= k20x5
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= PJRC_TEENSY_3
+endif
+
+ifneq ($(findstring MK20DX256, $(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
+ # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = KINETIS
+ MCU_SERIES = K20x
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= MK20DX256
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= k20x7
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= PJRC_TEENSY_3_1
+endif
+
ifneq ($(findstring STM32F303, $(MCU)),)
# Cortex version
MCU = cortex-m4