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.mk70
1 files changed, 69 insertions, 1 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk
index f7eaeec8a..7c4a617af 100644
--- a/quantum/mcu_selection.mk
+++ b/quantum/mcu_selection.mk
@@ -81,7 +81,7 @@ ifneq ($(findstring MK20DX256, $(MCU)),)
81 BOARD ?= PJRC_TEENSY_3_1 81 BOARD ?= PJRC_TEENSY_3_1
82endif 82endif
83 83
84ifneq ($(findstring MK66F18, $(MCU)),) 84ifneq ($(findstring MK66FX1M0, $(MCU)),)
85 # Cortex version 85 # Cortex version
86 MCU = cortex-m4 86 MCU = cortex-m4
87 87
@@ -138,6 +138,11 @@ ifneq ($(findstring STM32F042, $(MCU)),)
138 138
139 # UF2 settings 139 # UF2 settings
140 UF2_FAMILY ?= STM32F0 140 UF2_FAMILY ?= STM32F0
141
142 # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
143 # This ensures that the EEPROM page buffer fits into RAM
144 USE_PROCESS_STACKSIZE = 0x600
145 USE_EXCEPTIONS_STACKSIZE = 0x300
141endif 146endif
142 147
143ifneq ($(findstring STM32F072, $(MCU)),) 148ifneq ($(findstring STM32F072, $(MCU)),)
@@ -273,6 +278,38 @@ ifneq ($(findstring STM32F401, $(MCU)),)
273 UF2_FAMILY ?= STM32F4 278 UF2_FAMILY ?= STM32F4
274endif 279endif
275 280
281ifneq ($(findstring STM32F405, $(MCU)),)
282 # Cortex version
283 MCU = cortex-m4
284
285 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
286 ARMV = 7
287
288 ## chip/board settings
289 # - the next two should match the directories in
290 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
291 MCU_FAMILY = STM32
292 MCU_SERIES = STM32F4xx
293
294 # Linker script to use
295 # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
296 # or <keyboard_dir>/ld/
297 MCU_LDSCRIPT ?= STM32F405xG
298
299 # Startup code to use
300 # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
301 MCU_STARTUP ?= stm32f4xx
302
303 # Board: it should exist either in <chibios>/os/hal/boards/,
304 # <keyboard_dir>/boards/, or drivers/boards/
305 BOARD ?= GENERIC_STM32_F405XG
306
307 USE_FPU ?= yes
308
309 # UF2 settings
310 UF2_FAMILY ?= STM32F4
311endif
312
276ifneq ($(findstring STM32F407, $(MCU)),) 313ifneq ($(findstring STM32F407, $(MCU)),)
277 # Cortex version 314 # Cortex version
278 MCU = cortex-m4 315 MCU = cortex-m4
@@ -504,6 +541,37 @@ ifneq (,$(filter $(MCU),STM32L412 STM32L422))
504 UF2_FAMILY ?= STM32L4 541 UF2_FAMILY ?= STM32L4
505endif 542endif
506 543
544ifneq ($(findstring GD32VF103, $(MCU)),)
545 # RISC-V
546 MCU = risc-v
547
548 # RISC-V extensions and abi configuration
549 MCU_ARCH = rv32imac
550 MCU_ABI = ilp32
551 MCU_CMODEL = medlow
552
553 ## chip/board settings
554 # - the next two should match the directories in
555 # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
556 MCU_FAMILY = GD32V
557 MCU_SERIES = GD32VF103
558
559 # Linker script to use
560 # - it should exist either in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/ld/
561 # or <keyboard_dir>/ld/
562 MCU_LDSCRIPT ?= GD32VF103xB
563
564 # Startup code to use
565 # - it should exist in <chibios>/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/
566 MCU_STARTUP ?= gd32vf103
567
568 # Board: it should exist either in <chibios>/os/hal/boards/,
569 # <keyboard_dir>/boards/, or drivers/boards/
570 BOARD ?= SIPEED_LONGAN_NANO
571
572 USE_FPU ?= no
573endif
574
507ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) 575ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
508 PROTOCOL = LUFA 576 PROTOCOL = LUFA
509 577