From 39161b9ee793f4c62836b209ec877acda457b88d Mon Sep 17 00:00:00 2001 From: HorrorTroll Date: Thu, 21 Nov 2024 13:28:28 +0700 Subject: Added MCU support for ArteryTek AT32F415 (#23445) --- platforms/chibios/mcu_selection.mk | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'platforms/chibios/mcu_selection.mk') diff --git a/platforms/chibios/mcu_selection.mk b/platforms/chibios/mcu_selection.mk index a1597fa1e9..086a2b31c6 100644 --- a/platforms/chibios/mcu_selection.mk +++ b/platforms/chibios/mcu_selection.mk @@ -809,6 +809,40 @@ ifneq ($(findstring WB32FQ95, $(MCU)),) WB32_BOOTLOADER_ADDRESS ?= 0x1FFFE000 endif +ifneq ($(findstring AT32F415, $(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 + # /os/hal/ports/$(MCU_PORT_NAME)/$(MCU_SERIES) + # OR + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = AT32 + MCU_SERIES = AT32F415 + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= AT32F415xB + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= at32f415 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_AT32_F415XX + + USE_FPU ?= no + + # Bootloader address for AT32 DFU + AT32_BOOTLOADER_ADDRESS ?= 0x1FFFAC00 +endif + ifneq ($(findstring GD32VF103, $(MCU)),) # RISC-V MCU = risc-v -- cgit v1.2.3