diff options
Diffstat (limited to 'quantum/mcu_selection.mk')
| -rw-r--r-- | quantum/mcu_selection.mk | 102 |
1 files changed, 64 insertions, 38 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 9268c4522..dc441d27b 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk | |||
| @@ -136,10 +136,6 @@ ifneq ($(findstring STM32F042, $(MCU)),) | |||
| 136 | 136 | ||
| 137 | USE_FPU ?= no | 137 | USE_FPU ?= no |
| 138 | 138 | ||
| 139 | # Options to pass to dfu-util when flashing | ||
| 140 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 141 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 142 | |||
| 143 | # UF2 settings | 139 | # UF2 settings |
| 144 | UF2_FAMILY ?= STM32F0 | 140 | UF2_FAMILY ?= STM32F0 |
| 145 | endif | 141 | endif |
| @@ -172,10 +168,6 @@ ifneq ($(findstring STM32F072, $(MCU)),) | |||
| 172 | 168 | ||
| 173 | USE_FPU ?= no | 169 | USE_FPU ?= no |
| 174 | 170 | ||
| 175 | # Options to pass to dfu-util when flashing | ||
| 176 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 177 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 178 | |||
| 179 | # UF2 settings | 171 | # UF2 settings |
| 180 | UF2_FAMILY ?= STM32F0 | 172 | UF2_FAMILY ?= STM32F0 |
| 181 | endif | 173 | endif |
| @@ -208,10 +200,6 @@ ifneq ($(findstring STM32F103, $(MCU)),) | |||
| 208 | 200 | ||
| 209 | USE_FPU ?= no | 201 | USE_FPU ?= no |
| 210 | 202 | ||
| 211 | # Options to pass to dfu-util when flashing | ||
| 212 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 213 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 214 | |||
| 215 | # UF2 settings | 203 | # UF2 settings |
| 216 | UF2_FAMILY ?= STM32F1 | 204 | UF2_FAMILY ?= STM32F1 |
| 217 | endif | 205 | endif |
| @@ -244,10 +232,6 @@ ifneq ($(findstring STM32F303, $(MCU)),) | |||
| 244 | 232 | ||
| 245 | USE_FPU ?= yes | 233 | USE_FPU ?= yes |
| 246 | 234 | ||
| 247 | # Options to pass to dfu-util when flashing | ||
| 248 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 249 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 250 | |||
| 251 | # UF2 settings | 235 | # UF2 settings |
| 252 | UF2_FAMILY ?= STM32F3 | 236 | UF2_FAMILY ?= STM32F3 |
| 253 | endif | 237 | endif |
| @@ -280,9 +264,37 @@ ifneq ($(findstring STM32F401, $(MCU)),) | |||
| 280 | 264 | ||
| 281 | USE_FPU ?= yes | 265 | USE_FPU ?= yes |
| 282 | 266 | ||
| 283 | # Options to pass to dfu-util when flashing | 267 | # UF2 settings |
| 284 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 268 | UF2_FAMILY ?= STM32F4 |
| 285 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 269 | endif |
| 270 | |||
| 271 | ifneq ($(findstring STM32F407, $(MCU)),) | ||
| 272 | # Cortex version | ||
| 273 | MCU = cortex-m4 | ||
| 274 | |||
| 275 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 276 | ARMV = 7 | ||
| 277 | |||
| 278 | ## chip/board settings | ||
| 279 | # - the next two should match the directories in | ||
| 280 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 281 | MCU_FAMILY = STM32 | ||
| 282 | MCU_SERIES = STM32F4xx | ||
| 283 | |||
| 284 | # Linker script to use | ||
| 285 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 286 | # or <keyboard_dir>/ld/ | ||
| 287 | MCU_LDSCRIPT ?= STM32F407xE | ||
| 288 | |||
| 289 | # Startup code to use | ||
| 290 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
| 291 | MCU_STARTUP ?= stm32f4xx | ||
| 292 | |||
| 293 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
| 294 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
| 295 | BOARD ?= GENERIC_STM32_F407XE | ||
| 296 | |||
| 297 | USE_FPU ?= yes | ||
| 286 | 298 | ||
| 287 | # UF2 settings | 299 | # UF2 settings |
| 288 | UF2_FAMILY ?= STM32F4 | 300 | UF2_FAMILY ?= STM32F4 |
| @@ -321,10 +333,6 @@ ifneq ($(findstring STM32F411, $(MCU)),) | |||
| 321 | 333 | ||
| 322 | USE_FPU ?= yes | 334 | USE_FPU ?= yes |
| 323 | 335 | ||
| 324 | # Options to pass to dfu-util when flashing | ||
| 325 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 326 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 327 | |||
| 328 | # UF2 settings | 336 | # UF2 settings |
| 329 | UF2_FAMILY ?= STM32F4 | 337 | UF2_FAMILY ?= STM32F4 |
| 330 | endif | 338 | endif |
| @@ -357,10 +365,6 @@ ifneq ($(findstring STM32F446, $(MCU)),) | |||
| 357 | BOARD ?= GENERIC_STM32_F446XE | 365 | BOARD ?= GENERIC_STM32_F446XE |
| 358 | 366 | ||
| 359 | USE_FPU ?= yes | 367 | 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 | ||
| 364 | endif | 368 | endif |
| 365 | 369 | ||
| 366 | ifneq ($(findstring STM32G431, $(MCU)),) | 370 | ifneq ($(findstring STM32G431, $(MCU)),) |
| @@ -391,10 +395,6 @@ ifneq ($(findstring STM32G431, $(MCU)),) | |||
| 391 | 395 | ||
| 392 | USE_FPU ?= yes | 396 | USE_FPU ?= yes |
| 393 | 397 | ||
| 394 | # Options to pass to dfu-util when flashing | ||
| 395 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 396 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 397 | |||
| 398 | # UF2 settings | 398 | # UF2 settings |
| 399 | UF2_FAMILY ?= STM32G4 | 399 | UF2_FAMILY ?= STM32G4 |
| 400 | endif | 400 | endif |
| @@ -427,10 +427,6 @@ ifneq ($(findstring STM32G474, $(MCU)),) | |||
| 427 | 427 | ||
| 428 | USE_FPU ?= yes | 428 | USE_FPU ?= yes |
| 429 | 429 | ||
| 430 | # Options to pass to dfu-util when flashing | ||
| 431 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | ||
| 432 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | ||
| 433 | |||
| 434 | # UF2 settings | 430 | # UF2 settings |
| 435 | UF2_FAMILY ?= STM32G4 | 431 | UF2_FAMILY ?= STM32G4 |
| 436 | endif | 432 | endif |
| @@ -465,9 +461,39 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443)) | |||
| 465 | 461 | ||
| 466 | USE_FPU ?= yes | 462 | USE_FPU ?= yes |
| 467 | 463 | ||
| 468 | # Options to pass to dfu-util when flashing | 464 | # UF2 settings |
| 469 | DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave | 465 | UF2_FAMILY ?= STM32L4 |
| 470 | DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 | 466 | endif |
| 467 | |||
| 468 | ifneq (,$(filter $(MCU),STM32L412 STM32L422)) | ||
| 469 | # Cortex version | ||
| 470 | MCU = cortex-m4 | ||
| 471 | |||
| 472 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
| 473 | ARMV = 7 | ||
| 474 | |||
| 475 | ## chip/board settings | ||
| 476 | # - the next two should match the directories in | ||
| 477 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
| 478 | MCU_FAMILY = STM32 | ||
| 479 | MCU_SERIES = STM32L4xx | ||
| 480 | |||
| 481 | # Linker script to use | ||
| 482 | # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
| 483 | # or <keyboard_dir>/ld/ | ||
| 484 | MCU_LDSCRIPT ?= STM32L412xB | ||
| 485 | |||
| 486 | # Startup code to use | ||
| 487 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
| 488 | MCU_STARTUP ?= stm32l4xx | ||
| 489 | |||
| 490 | # Board: it should exist either in <chibios>/os/hal/boards/, | ||
| 491 | # <keyboard_dir>/boards/, or drivers/boards/ | ||
| 492 | BOARD ?= GENERIC_STM32_L412XB | ||
| 493 | |||
| 494 | PLATFORM_NAME ?= platform_l432 | ||
| 495 | |||
| 496 | USE_FPU ?= yes | ||
| 471 | 497 | ||
| 472 | # UF2 settings | 498 | # UF2 settings |
| 473 | UF2_FAMILY ?= STM32L4 | 499 | UF2_FAMILY ?= STM32L4 |
