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:
parent
bd8cee8683
commit
067f32731e
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue