aboutsummaryrefslogtreecommitdiff
path: root/quantum/mcu_selection.mk
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/mcu_selection.mk')
-rw-r--r--quantum/mcu_selection.mk109
1 files changed, 70 insertions, 39 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index 9268c4522..f7eaeec8a 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
145endif 141endif
@@ -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
181endif 173endif
@@ -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
217endif 205endif
@@ -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
253endif 237endif
@@ -268,7 +252,12 @@ ifneq ($(findstring STM32F401, $(MCU)),)
268 # Linker script to use 252 # Linker script to use
269 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ 253 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
270 # or <keyboard_dir>/ld/ 254 # or <keyboard_dir>/ld/
271 MCU_LDSCRIPT ?= STM32F401xC 255 ifeq ($(strip $(BOOTLOADER)), tinyuf2)
256 MCU_LDSCRIPT ?= STM32F401xC_tinyuf2
257 FIRMWARE_FORMAT ?= uf2
258 else
259 MCU_LDSCRIPT ?= STM32F401xC
260 endif
272 261
273 # Startup code to use 262 # Startup code to use
274 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ 263 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
@@ -280,9 +269,37 @@ ifneq ($(findstring STM32F401, $(MCU)),)
280 269
281 USE_FPU ?= yes 270 USE_FPU ?= yes
282 271
283 # Options to pass to dfu-util when flashing 272 # UF2 settings
284 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave 273 UF2_FAMILY ?= STM32F4
285 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 274endif
275
276ifneq ($(findstring STM32F407, $(MCU)),)
277 # Cortex version
278 MCU = cortex-m4
279
280 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
281 ARMV = 7
282
283 ## chip/board settings
284 # - the next two should match the directories in
285 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
286 MCU_FAMILY = STM32
287 MCU_SERIES = STM32F4xx
288
289 # Linker script to use
290 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
291 # or <keyboard_dir>/ld/
292 MCU_LDSCRIPT ?= STM32F407xE
293
294 # Startup code to use
295 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
296 MCU_STARTUP ?= stm32f4xx
297
298 # Board: it should exist either in <chibios>/os/hal/boards/,
299 # <keyboard_dir>/boards/, or drivers/boards/
300 BOARD ?= GENERIC_STM32_F407XE
301
302 USE_FPU ?= yes
286 303
287 # UF2 settings 304 # UF2 settings
288 UF2_FAMILY ?= STM32F4 305 UF2_FAMILY ?= STM32F4
@@ -321,10 +338,6 @@ ifneq ($(findstring STM32F411, $(MCU)),)
321 338
322 USE_FPU ?= yes 339 USE_FPU ?= yes
323 340
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 341 # UF2 settings
329 UF2_FAMILY ?= STM32F4 342 UF2_FAMILY ?= STM32F4
330endif 343endif
@@ -357,10 +370,6 @@ ifneq ($(findstring STM32F446, $(MCU)),)
357 BOARD ?= GENERIC_STM32_F446XE 370 BOARD ?= GENERIC_STM32_F446XE
358 371
359 USE_FPU ?= yes 372 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
364endif 373endif
365 374
366ifneq ($(findstring STM32G431, $(MCU)),) 375ifneq ($(findstring STM32G431, $(MCU)),)
@@ -391,10 +400,6 @@ ifneq ($(findstring STM32G431, $(MCU)),)
391 400
392 USE_FPU ?= yes 401 USE_FPU ?= yes
393 402
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 403 # UF2 settings
399 UF2_FAMILY ?= STM32G4 404 UF2_FAMILY ?= STM32G4
400endif 405endif
@@ -427,10 +432,6 @@ ifneq ($(findstring STM32G474, $(MCU)),)
427 432
428 USE_FPU ?= yes 433 USE_FPU ?= yes
429 434
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 435 # UF2 settings
435 UF2_FAMILY ?= STM32G4 436 UF2_FAMILY ?= STM32G4
436endif 437endif
@@ -465,9 +466,39 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443))
465 466
466 USE_FPU ?= yes 467 USE_FPU ?= yes
467 468
468 # Options to pass to dfu-util when flashing 469 # UF2 settings
469 DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave 470 UF2_FAMILY ?= STM32L4
470 DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 471endif
472
473ifneq (,$(filter $(MCU),STM32L412 STM32L422))
474 # Cortex version
475 MCU = cortex-m4
476
477 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
478 ARMV = 7
479
480 ## chip/board settings
481 # - the next two should match the directories in
482 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
483 MCU_FAMILY = STM32
484 MCU_SERIES = STM32L4xx
485
486 # Linker script to use
487 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
488 # or <keyboard_dir>/ld/
489 MCU_LDSCRIPT ?= STM32L412xB
490
491 # Startup code to use
492 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
493 MCU_STARTUP ?= stm32l4xx
494
495 # Board: it should exist either in <chibios>/os/hal/boards/,
496 # <keyboard_dir>/boards/, or drivers/boards/
497 BOARD ?= GENERIC_STM32_L412XB
498
499 PLATFORM_NAME ?= platform_l432
500
501 USE_FPU ?= yes
471 502
472 # UF2 settings 503 # UF2 settings
473 UF2_FAMILY ?= STM32L4 504 UF2_FAMILY ?= STM32L4