diff options
Diffstat (limited to 'quantum/mcu_selection.mk')
-rw-r--r-- | quantum/mcu_selection.mk | 72 |
1 files changed, 33 insertions, 39 deletions
diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 9268c4522e..ca0accd719 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -136,10 +136,6 @@ ifneq ($(findstring STM32F042, $(MCU)),) USE_FPU ?= no - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F0 endif @@ -172,10 +168,6 @@ ifneq ($(findstring STM32F072, $(MCU)),) USE_FPU ?= no - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F0 endif @@ -208,10 +200,6 @@ ifneq ($(findstring STM32F103, $(MCU)),) USE_FPU ?= no - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F1 endif @@ -244,10 +232,6 @@ ifneq ($(findstring STM32F303, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F3 endif @@ -280,10 +264,6 @@ ifneq ($(findstring STM32F401, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F4 endif @@ -321,10 +301,6 @@ ifneq ($(findstring STM32F411, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F4 endif @@ -357,10 +333,6 @@ ifneq ($(findstring STM32F446, $(MCU)),) BOARD ?= GENERIC_STM32_F446XE USE_FPU ?= yes - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32G431, $(MCU)),) @@ -391,10 +363,6 @@ ifneq ($(findstring STM32G431, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32G4 endif @@ -427,10 +395,6 @@ ifneq ($(findstring STM32G474, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32G4 endif @@ -465,9 +429,39 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443)) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 + # UF2 settings + UF2_FAMILY ?= STM32L4 +endif + +ifneq (,$(filter $(MCU),STM32L412 STM32L422)) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32L4xx + + # Linker script to use + # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ + # or <keyboard_dir>/ld/ + MCU_LDSCRIPT ?= STM32L412xB + + # Startup code to use + # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32l4xx + + # Board: it should exist either in <chibios>/os/hal/boards/, + # <keyboard_dir>/boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_L412XB + + PLATFORM_NAME ?= platform_l432 + + USE_FPU ?= yes # UF2 settings UF2_FAMILY ?= STM32L4 |