aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/mcu_selection.mk
diff options
context:
space:
mode:
authorGravatar Ryan <fauxpark@gmail.com>2020-02-21 17:12:15 +1100
committerGravatar GitHub <noreply@github.com>2020-02-21 17:12:15 +1100
commit66d7fc34b2214282fd822f66abca0905ec5a1ffe (patch)
treeb1bb470061f641e77bc6965612772e4eb31602c0 /quantum/mcu_selection.mk
parent81423cc8178e760a641655ec8d82ebf78c41c9ef (diff)
downloadqmk_firmware-66d7fc34b2214282fd822f66abca0905ec5a1ffe.tar.gz
Add Arm Teensys to mcu_selection.mk (#8026)
* Add Arm Teensys to mcu_selection.mk * Roll back halfkeyboard keymap changes * Remove extra newline
Diffstat (limited to 'quantum/mcu_selection.mk')
-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 f41a9e821..f15a4f58c 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