aboutsummaryrefslogtreecommitdiff
path: root/platforms/chibios/mcu_selection.mk
diff options
context:
space:
mode:
Diffstat (limited to 'platforms/chibios/mcu_selection.mk')
-rw-r--r--platforms/chibios/mcu_selection.mk35
1 files changed, 35 insertions, 0 deletions
diff --git a/platforms/chibios/mcu_selection.mk b/platforms/chibios/mcu_selection.mk
index 086a2b31c6..199bdb2321 100644
--- a/platforms/chibios/mcu_selection.mk
+++ b/platforms/chibios/mcu_selection.mk
@@ -511,6 +511,41 @@ ifneq ($(findstring STM32F446, $(MCU)),)
EEPROM_DRIVER ?= transient
endif
+ifneq ($(findstring STM32G0B1, $(MCU)),)
+ # Cortex version
+ MCU = cortex-m0plus
+
+ # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ ARMV = 6
+
+ ## chip/board settings
+ # - the next two should match the directories in
+ # <chibios[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
+ # OR
+ # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_FAMILY = STM32
+ MCU_SERIES = STM32G0xx
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= STM32G0B1xB
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= stm32g0xx
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= GENERIC_STM32_G0B1XB
+
+ # UF2 settings
+ UF2_FAMILY ?= STM32G0
+
+ # Bootloader address for STM32 DFU
+ STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000
+endif
+
ifneq ($(findstring STM32G431, $(MCU)),)
# Cortex version
MCU = cortex-m4