soc: arm: gigadevice: use specific series for GD32F403
Despite the "F4" prefix, GD32F403 is an SoC with significant differences compared to other F4 MCUs: - It has a completely different HAL - It has significant hardware differences, for example, the pinctrl mechanism uses AFIO (all others use AF) The grouping principles applied to other similar vendors such as ST can't be applied for GD32 due to these reasons, so the approach taken here is to define series based on the used HAL. A different HAL likely means that there are significant hardware differences between, e.g. F403 and F405. The vendor likely chose a confusing naming scheme, but we need to deal with it. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
8fbbf2baef
commit
fcbb9476f8
10 changed files with 17 additions and 21 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2021, ATL Electronics
|
# Copyright (c) 2021, ATL Electronics
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
CONFIG_SOC_SERIES_GD32F4=y
|
CONFIG_SOC_SERIES_GD32F403=y
|
||||||
CONFIG_SOC_GD32F403Z=y
|
CONFIG_SOC_GD32F403Z=y
|
||||||
CONFIG_BOARD_GD32F403Z_EVAL=y
|
CONFIG_BOARD_GD32F403Z_EVAL=y
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Copyright (c) 2021, ATL Electronics
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
if SOC_SERIES_GD32F4
|
|
||||||
|
|
||||||
source "soc/arm/gigadevice/gd32f4/Kconfig.defconfig.gd32f4*"
|
|
||||||
|
|
||||||
config SOC_SERIES
|
|
||||||
default "gd32f4"
|
|
||||||
|
|
||||||
endif # SOC_SERIES_GD32F4
|
|
|
@ -8,10 +8,6 @@ config SOC
|
||||||
default "gd32f403v" if SOC_GD32F403V
|
default "gd32f403v" if SOC_GD32F403V
|
||||||
default "gd32f403z" if SOC_GD32F403Z
|
default "gd32f403z" if SOC_GD32F403Z
|
||||||
|
|
||||||
config SOC_SERIES_GD32F403
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||||
default 168000000
|
default 168000000
|
||||||
|
|
11
soc/arm/gigadevice/gd32f403/Kconfig.defconfig.series
Normal file
11
soc/arm/gigadevice/gd32f403/Kconfig.defconfig.series
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Copyright (c) 2021, ATL Electronics
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if SOC_SERIES_GD32F403
|
||||||
|
|
||||||
|
source "soc/arm/gigadevice/gd32f403/Kconfig.defconfig.gd32f403"
|
||||||
|
|
||||||
|
config SOC_SERIES
|
||||||
|
default "gd32f403"
|
||||||
|
|
||||||
|
endif # SOC_SERIES_GD32F403
|
|
@ -1,8 +1,8 @@
|
||||||
# Copyright (c) 2021, ATL Electronics
|
# Copyright (c) 2021, ATL Electronics
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
config SOC_SERIES_GD32F4
|
config SOC_SERIES_GD32F403
|
||||||
bool "GigaDevice GD32F4xxx series Cortex-M4F MCU"
|
bool "GigaDevice GD32F403 series Cortex-M4F MCU"
|
||||||
select ARM
|
select ARM
|
||||||
select CPU_HAS_ARM_MPU
|
select CPU_HAS_ARM_MPU
|
||||||
select CPU_HAS_FPU
|
select CPU_HAS_FPU
|
||||||
|
@ -11,4 +11,4 @@ config SOC_SERIES_GD32F4
|
||||||
select CPU_CORTEX_M_HAS_VTOR
|
select CPU_CORTEX_M_HAS_VTOR
|
||||||
select SOC_FAMILY_GD32_ARM
|
select SOC_FAMILY_GD32_ARM
|
||||||
help
|
help
|
||||||
Enable support for GigaDevice GD32F4xxx MCU series
|
Enable support for GigaDevice GD32F403 MCU series
|
|
@ -2,8 +2,8 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "GigaDevice GD32F4xx MCU Selection"
|
prompt "GigaDevice GD32F403 MCU Selection"
|
||||||
depends on SOC_SERIES_GD32F4
|
depends on SOC_SERIES_GD32F403
|
||||||
|
|
||||||
config SOC_GD32F403R
|
config SOC_GD32F403R
|
||||||
bool "gd32f403r"
|
bool "gd32f403r"
|
Loading…
Add table
Add a link
Reference in a new issue