summaryrefslogtreecommitdiff
path: root/builddefs/mcu_selection.mk
diff options
context:
space:
mode:
Diffstat (limited to 'builddefs/mcu_selection.mk')
-rw-r--r--builddefs/mcu_selection.mk77
1 files changed, 77 insertions, 0 deletions
diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk
index 46d34aabe4..9fdd22c3b6 100644
--- a/builddefs/mcu_selection.mk
+++ b/builddefs/mcu_selection.mk
@@ -143,6 +143,9 @@ ifneq ($(findstring STM32F042, $(MCU)),)
# This ensures that the EEPROM page buffer fits into RAM
USE_PROCESS_STACKSIZE = 0x600
USE_EXCEPTIONS_STACKSIZE = 0x300
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC400
endif
ifneq ($(findstring STM32F072, $(MCU)),)
@@ -175,6 +178,9 @@ ifneq ($(findstring STM32F072, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32F0
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFFC800
endif
ifneq ($(findstring STM32F103, $(MCU)),)
@@ -239,6 +245,9 @@ ifneq ($(findstring STM32F303, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32F3
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFFD800
endif
ifneq ($(findstring STM32F401, $(MCU)),)
@@ -276,6 +285,9 @@ ifneq ($(findstring STM32F401, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32F4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring STM32F405, $(MCU)),)
@@ -308,6 +320,9 @@ ifneq ($(findstring STM32F405, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32F4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring STM32F407, $(MCU)),)
@@ -340,6 +355,9 @@ ifneq ($(findstring STM32F407, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32F4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring STM32F411, $(MCU)),)
@@ -377,6 +395,9 @@ ifneq ($(findstring STM32F411, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32F4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring STM32F446, $(MCU)),)
@@ -406,6 +427,9 @@ ifneq ($(findstring STM32F446, $(MCU)),)
BOARD ?= GENERIC_STM32_F446XE
USE_FPU ?= yes
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring STM32G431, $(MCU)),)
@@ -438,6 +462,9 @@ ifneq ($(findstring STM32G431, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32G4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring STM32G474, $(MCU)),)
@@ -470,6 +497,46 @@ ifneq ($(findstring STM32G474, $(MCU)),)
# UF2 settings
UF2_FAMILY ?= STM32G4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
+endif
+
+ifneq (,$(filter $(MCU),STM32L432 STM32L442))
+ # 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/startup/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= STM32L432xC
+
+ # 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_L432XC
+
+ PLATFORM_NAME ?= platform_l432
+
+ USE_FPU ?= yes
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32L4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq (,$(filter $(MCU),STM32L433 STM32L443))
@@ -504,6 +571,9 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443))
# UF2 settings
UF2_FAMILY ?= STM32L4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq (,$(filter $(MCU),STM32L412 STM32L422))
@@ -538,6 +608,9 @@ ifneq (,$(filter $(MCU),STM32L412 STM32L422))
# UF2 settings
UF2_FAMILY ?= STM32L4
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
endif
ifneq ($(findstring WB32F3G71, $(MCU)),)
@@ -567,6 +640,10 @@ ifneq ($(findstring WB32F3G71, $(MCU)),)
BOARD ?= GENERIC_WB32_F3G71XX
USE_FPU ?= no
+
+ # Bootloader address for WB32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
+ WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000
endif
ifneq ($(findstring GD32VF103, $(MCU)),)