Skip to content

Commit 0e50aa9

Browse files
committed
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 <[email protected]>
1 parent 7424126 commit 0e50aa9

File tree

10 files changed

+17
-21
lines changed

10 files changed

+17
-21
lines changed

boards/arm/gd32f403z_eval/gd32f403z_eval_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2021, ATL Electronics
22
# SPDX-License-Identifier: Apache-2.0
33

4-
CONFIG_SOC_SERIES_GD32F4=y
4+
CONFIG_SOC_SERIES_GD32F403=y
55
CONFIG_SOC_GD32F403Z=y
66
CONFIG_BOARD_GD32F403Z_EVAL=y
77

soc/arm/gigadevice/gd32f4/Kconfig.defconfig.series

Lines changed: 0 additions & 11 deletions
This file was deleted.

soc/arm/gigadevice/gd32f4/Kconfig.defconfig.gd32f403 renamed to soc/arm/gigadevice/gd32f403/Kconfig.defconfig.gd32f403

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ config SOC
88
default "gd32f403v" if SOC_GD32F403V
99
default "gd32f403z" if SOC_GD32F403Z
1010

11-
config SOC_SERIES_GD32F403
12-
bool
13-
default y
14-
1511
config SYS_CLOCK_HW_CYCLES_PER_SEC
1612
default 168000000
1713

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2021, ATL Electronics
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SOC_SERIES_GD32F403
5+
6+
source "soc/arm/gigadevice/gd32f403/Kconfig.defconfig.gd32f403"
7+
8+
config SOC_SERIES
9+
default "gd32f403"
10+
11+
endif # SOC_SERIES_GD32F403
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Copyright (c) 2021, ATL Electronics
22
# SPDX-License-Identifier: Apache-2.0
33

4-
config SOC_SERIES_GD32F4
5-
bool "GigaDevice GD32F4xxx series Cortex-M4F MCU"
4+
config SOC_SERIES_GD32F403
5+
bool "GigaDevice GD32F403 series Cortex-M4F MCU"
66
select ARM
77
select CPU_HAS_ARM_MPU
88
select CPU_HAS_FPU
@@ -11,4 +11,4 @@ config SOC_SERIES_GD32F4
1111
select CPU_CORTEX_M_HAS_VTOR
1212
select SOC_FAMILY_GD32_ARM
1313
help
14-
Enable support for GigaDevice GD32F4xxx MCU series
14+
Enable support for GigaDevice GD32F403 MCU series

soc/arm/gigadevice/gd32f4/Kconfig.soc renamed to soc/arm/gigadevice/gd32f403/Kconfig.soc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
choice
5-
prompt "GigaDevice GD32F4xx MCU Selection"
6-
depends on SOC_SERIES_GD32F4
5+
prompt "GigaDevice GD32F403 MCU Selection"
6+
depends on SOC_SERIES_GD32F403
77

88
config SOC_GD32F403R
99
bool "gd32f403r"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)