modules: hal_gigadevice: use CONFIG_${ARCH} to select components

Instead of using custom SoC definitions. The selected components (e.g.
CMSIS), depend on the architecture selected by the SoC Kconfig options.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2024-01-02 12:11:01 +01:00 committed by Carles Cufí
parent bd8cee8683
commit 067f32731e
2 changed files with 3 additions and 3 deletions

View file

@ -6,9 +6,9 @@ if(CONFIG_HAS_GD32_HAL)
string(TOUPPER ${CONFIG_SOC} gd32_soc_uc) string(TOUPPER ${CONFIG_SOC} gd32_soc_uc)
set(gd32_soc_dir ${ZEPHYR_HAL_GIGADEVICE_MODULE_DIR}/${CONFIG_SOC_SERIES}) set(gd32_soc_dir ${ZEPHYR_HAL_GIGADEVICE_MODULE_DIR}/${CONFIG_SOC_SERIES})
if(CONFIG_SOC_FAMILY_GD32_ARM) if(CONFIG_ARM)
set(gd32_soc_sys_dir ${gd32_soc_dir}/cmsis/gd/${CONFIG_SOC_SERIES}) set(gd32_soc_sys_dir ${gd32_soc_dir}/cmsis/gd/${CONFIG_SOC_SERIES})
elseif(CONFIG_SOC_SERIES_GD32VF103) elseif(CONFIG_RISCV)
set(gd32_soc_sys_dir ${gd32_soc_dir}/riscv) set(gd32_soc_sys_dir ${gd32_soc_dir}/riscv)
zephyr_include_directories(${gd32_soc_dir}/riscv/drivers) zephyr_include_directories(${gd32_soc_dir}/riscv/drivers)
endif() endif()

View file

@ -16,7 +16,7 @@ config GD32_HAS_AFIO_PINMUX
config HAS_GD32_HAL config HAS_GD32_HAL
bool bool
select HAS_CMSIS_CORE if SOC_FAMILY_GD32_ARM select HAS_CMSIS_CORE if ARM
if HAS_GD32_HAL if HAS_GD32_HAL