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.mk36
1 files changed, 35 insertions, 1 deletions
diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk
index 0ea9630d59..1c45d375de 100644
--- a/builddefs/mcu_selection.mk
+++ b/builddefs/mcu_selection.mk
@@ -815,6 +815,40 @@ ifneq ($(findstring GD32VF103, $(MCU)),)
USE_FPU ?= no
endif
+ifneq ($(findstring GD32F303, $(MCU)),)
+ # 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[-contrib]>/os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES)
+ # OR
+ # <chibios[-contrib]>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
+ MCU_PORT_NAME = GD
+ MCU_FAMILY = GD32F
+ MCU_SERIES = GD32F303
+
+ # Linker script to use
+ # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/
+ # or <keyboard_dir>/ld/
+ MCU_LDSCRIPT ?= GD32F303x6
+
+ # Startup code to use
+ # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
+ MCU_STARTUP ?= gd32f30x
+
+ # Board: it should exist either in <chibios>/os/hal/boards/,
+ # <keyboard_dir>/boards/, or drivers/boards/
+ BOARD ?= GD32F303C_EVAL
+
+ STM32_BOOTLOADER_ADDRESS ?= 0x08002000
+
+ USE_FPU ?= no
+endif
+
ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287))
PROTOCOL = LUFA
@@ -909,4 +943,4 @@ ifneq (,$(filter $(MCU),attiny85))
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
F_CPU ?= 16500000
-endif
+endif \ No newline at end of file