diff options
Diffstat (limited to 'quantum/mcu_selection.mk')
-rw-r--r-- | quantum/mcu_selection.mk | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index f7329fc4d..2e4d25008 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk | |||
@@ -81,6 +81,33 @@ ifneq ($(findstring MK20DX256, $(MCU)),) | |||
81 | BOARD ?= PJRC_TEENSY_3_1 | 81 | BOARD ?= PJRC_TEENSY_3_1 |
82 | endif | 82 | endif |
83 | 83 | ||
84 | ifneq ($(findstring MK66F18, $(MCU)),) | ||
85 | # Cortex version | ||
86 | MCU = cortex-m4 | ||
87 | |||
88 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
89 | ARMV = 7 | ||
90 | |||
91 | ## chip/board settings | ||
92 | # - the next two should match the directories in | ||
93 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
94 | MCU_FAMILY = KINETIS | ||
95 | MCU_SERIES = MK66F18 | ||
96 | |||
97 | # Linker script to use | ||
98 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
99 | # or <keyboard_dir>/ld/ | ||
100 | MCU_LDSCRIPT ?= MK66FX1M0 | ||
101 | |||
102 | # Startup code to use | ||
103 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
104 | MCU_STARTUP ?= MK66F18 | ||
105 | |||
106 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
107 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
108 | BOARD ?= PJRC_TEENSY_3_6 | ||
109 | endif | ||
110 | |||
84 | ifneq ($(findstring STM32F042, $(MCU)),) | 111 | ifneq ($(findstring STM32F042, $(MCU)),) |
85 | # Cortex version | 112 | # Cortex version |
86 | MCU = cortex-m0 | 113 | MCU = cortex-m0 |
@@ -112,6 +139,9 @@ ifneq ($(findstring STM32F042, $(MCU)),) | |||
112 | # Options to pass to dfu-util when flashing | 139 | # Options to pass to dfu-util when flashing |
113 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 140 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
114 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 141 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
142 | |||
143 | # UF2 settings | ||
144 | UF2_FAMILY ?= STM32F0 | ||
115 | endif | 145 | endif |
116 | 146 | ||
117 | ifneq ($(findstring STM32F072, $(MCU)),) | 147 | ifneq ($(findstring STM32F072, $(MCU)),) |
@@ -145,6 +175,9 @@ ifneq ($(findstring STM32F072, $(MCU)),) | |||
145 | # Options to pass to dfu-util when flashing | 175 | # Options to pass to dfu-util when flashing |
146 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 176 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
147 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 177 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
178 | |||
179 | # UF2 settings | ||
180 | UF2_FAMILY ?= STM32F0 | ||
148 | endif | 181 | endif |
149 | 182 | ||
150 | ifneq ($(findstring STM32F103, $(MCU)),) | 183 | ifneq ($(findstring STM32F103, $(MCU)),) |
@@ -178,6 +211,9 @@ ifneq ($(findstring STM32F103, $(MCU)),) | |||
178 | # Options to pass to dfu-util when flashing | 211 | # Options to pass to dfu-util when flashing |
179 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 212 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
180 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 213 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
214 | |||
215 | # UF2 settings | ||
216 | UF2_FAMILY ?= STM32F1 | ||
181 | endif | 217 | endif |
182 | 218 | ||
183 | ifneq ($(findstring STM32F303, $(MCU)),) | 219 | ifneq ($(findstring STM32F303, $(MCU)),) |
@@ -211,6 +247,9 @@ ifneq ($(findstring STM32F303, $(MCU)),) | |||
211 | # Options to pass to dfu-util when flashing | 247 | # Options to pass to dfu-util when flashing |
212 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 248 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
213 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 249 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
250 | |||
251 | # UF2 settings | ||
252 | UF2_FAMILY ?= STM32F3 | ||
214 | endif | 253 | endif |
215 | 254 | ||
216 | ifneq ($(findstring STM32F401, $(MCU)),) | 255 | ifneq ($(findstring STM32F401, $(MCU)),) |
@@ -244,6 +283,9 @@ ifneq ($(findstring STM32F401, $(MCU)),) | |||
244 | # Options to pass to dfu-util when flashing | 283 | # Options to pass to dfu-util when flashing |
245 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 284 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
246 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 285 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
286 | |||
287 | # UF2 settings | ||
288 | UF2_FAMILY ?= STM32F4 | ||
247 | endif | 289 | endif |
248 | 290 | ||
249 | ifneq ($(findstring STM32F411, $(MCU)),) | 291 | ifneq ($(findstring STM32F411, $(MCU)),) |
@@ -277,6 +319,9 @@ ifneq ($(findstring STM32F411, $(MCU)),) | |||
277 | # Options to pass to dfu-util when flashing | 319 | # Options to pass to dfu-util when flashing |
278 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 320 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
279 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 321 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
322 | |||
323 | # UF2 settings | ||
324 | UF2_FAMILY ?= STM32F4 | ||
280 | endif | 325 | endif |
281 | 326 | ||
282 | ifneq ($(findstring STM32G431, $(MCU)),) | 327 | ifneq ($(findstring STM32G431, $(MCU)),) |
@@ -310,6 +355,9 @@ ifneq ($(findstring STM32G431, $(MCU)),) | |||
310 | # Options to pass to dfu-util when flashing | 355 | # Options to pass to dfu-util when flashing |
311 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 356 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
312 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 357 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
358 | |||
359 | # UF2 settings | ||
360 | UF2_FAMILY ?= STM32G4 | ||
313 | endif | 361 | endif |
314 | 362 | ||
315 | ifneq ($(findstring STM32G474, $(MCU)),) | 363 | ifneq ($(findstring STM32G474, $(MCU)),) |
@@ -343,6 +391,9 @@ ifneq ($(findstring STM32G474, $(MCU)),) | |||
343 | # Options to pass to dfu-util when flashing | 391 | # Options to pass to dfu-util when flashing |
344 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 392 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
345 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 393 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
394 | |||
395 | # UF2 settings | ||
396 | UF2_FAMILY ?= STM32G4 | ||
346 | endif | 397 | endif |
347 | 398 | ||
348 | ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) | 399 | ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) |