diff options
Diffstat (limited to 'quantum/mcu_selection.mk')
| -rw-r--r-- | quantum/mcu_selection.mk | 130 |
1 files changed, 129 insertions, 1 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index f7329fc4d..9268c4522 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)),) |
| @@ -262,7 +304,12 @@ ifneq ($(findstring STM32F411, $(MCU)),) | |||
| 262 | # Linker script to use | 304 | # Linker script to use |
| 263 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | 305 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ |
| 264 | # or <keyboard_dir>/ld/ | 306 | # or <keyboard_dir>/ld/ |
| 265 | MCU_LDSCRIPT ?= STM32F411xE | 307 | ifeq ($(strip $(BOOTLOADER)), tinyuf2) |
| 308 | MCU_LDSCRIPT ?= STM32F411xE_tinyuf2 | ||
| 309 | FIRMWARE_FORMAT ?= uf2 | ||
| 310 | else | ||
| 311 | MCU_LDSCRIPT ?= STM32F411xE | ||
| 312 | endif | ||
| 266 | 313 | ||
| 267 | # Startup code to use | 314 | # Startup code to use |
| 268 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | 315 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ |
| @@ -277,6 +324,43 @@ ifneq ($(findstring STM32F411, $(MCU)),) | |||
| 277 | # Options to pass to dfu-util when flashing | 324 | # Options to pass to dfu-util when flashing |
| 278 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 325 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
| 279 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 326 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
| 327 | |||
| 328 | # UF2 settings | ||
| 329 | UF2_FAMILY ?= STM32F4 | ||
| 330 | endif | ||
| 331 | |||
| 332 | ifneq ($(findstring STM32F446, $(MCU)),) | ||
| 333 | # Cortex version | ||
| 334 | MCU = cortex-m4 | ||
| 335 | |||
| 336 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 337 | ARMV = 7 | ||
| 338 | |||
| 339 | ## chip/board settings | ||
| 340 | # - the next two should match the directories in | ||
| 341 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 342 | MCU_FAMILY = STM32 | ||
| 343 | MCU_SERIES = STM32F4xx | ||
| 344 | |||
| 345 | # Linker script to use | ||
| 346 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 347 | # or <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ | ||
| 348 | # or <keyboard_dir>/ld/ | ||
| 349 | MCU_LDSCRIPT ?= STM32F446xE | ||
| 350 | |||
| 351 | # Startup code to use | ||
| 352 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
| 353 | MCU_STARTUP ?= stm32f4xx | ||
| 354 | |||
| 355 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
| 356 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
| 357 | BOARD ?= GENERIC_STM32_F446XE | ||
| 358 | |||
| 359 | USE_FPU ?= yes | ||
| 360 | |||
| 361 | # Options to pass to dfu-util when flashing | ||
| 362 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 363 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 280 | endif | 364 | endif |
| 281 | 365 | ||
| 282 | ifneq ($(findstring STM32G431, $(MCU)),) | 366 | ifneq ($(findstring STM32G431, $(MCU)),) |
| @@ -310,6 +394,9 @@ ifneq ($(findstring STM32G431, $(MCU)),) | |||
| 310 | # Options to pass to dfu-util when flashing | 394 | # Options to pass to dfu-util when flashing |
| 311 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 395 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
| 312 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 396 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
| 397 | |||
| 398 | # UF2 settings | ||
| 399 | UF2_FAMILY ?= STM32G4 | ||
| 313 | endif | 400 | endif |
| 314 | 401 | ||
| 315 | ifneq ($(findstring STM32G474, $(MCU)),) | 402 | ifneq ($(findstring STM32G474, $(MCU)),) |
| @@ -343,6 +430,47 @@ ifneq ($(findstring STM32G474, $(MCU)),) | |||
| 343 | # Options to pass to dfu-util when flashing | 430 | # Options to pass to dfu-util when flashing |
| 344 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 431 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave |
| 345 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 432 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 |
| 433 | |||
| 434 | # UF2 settings | ||
| 435 | UF2_FAMILY ?= STM32G4 | ||
| 436 | endif | ||
| 437 | |||
| 438 | ifneq (,$(filter $(MCU),STM32L433 STM32L443)) | ||
| 439 | # Cortex version | ||
| 440 | MCU = cortex-m4 | ||
| 441 | |||
| 442 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 443 | ARMV = 7 | ||
| 444 | |||
| 445 | ## chip/board settings | ||
| 446 | # - the next two should match the directories in | ||
| 447 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 448 | MCU_FAMILY = STM32 | ||
| 449 | MCU_SERIES = STM32L4xx | ||
| 450 | |||
| 451 | # Linker script to use | ||
| 452 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 453 | # or <keyboard_dir>/ld/ | ||
| 454 | MCU_LDSCRIPT ?= STM32L432xC | ||
| 455 | |||
| 456 | # Startup code to use | ||
| 457 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
| 458 | MCU_STARTUP ?= stm32l4xx | ||
| 459 | |||
| 460 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
| 461 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
| 462 | BOARD ?= GENERIC_STM32_L433XC | ||
| 463 | |||
| 464 | PLATFORM_NAME ?= platform_l432 | ||
| 465 | |||
| 466 | USE_FPU ?= yes | ||
| 467 | |||
| 468 | # Options to pass to dfu-util when flashing | ||
| 469 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 470 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 471 | |||
| 472 | # UF2 settings | ||
| 473 | UF2_FAMILY ?= STM32L4 | ||
| 346 | endif | 474 | endif |
| 347 | 475 | ||
| 348 | ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) | 476 | ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) |
