Skip to content

Commit 86eca14

Browse files
committed
modules: hal_nxp: Load SDK common drver per architecture
- The fsl_common_dsp driver needs to be loaded when building xtensa projects and the fsl_common_arm driver needs to be loaded when building arm projects. - Add a condition to load power driver, because the power driver is needed to build RT700 arm core project, but it is not needed to build hifi core project. Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent b539372 commit 86eca14

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

modules/hal_nxp/mcux/mcux-sdk-ng/device/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ endif()
3939
set(CONFIG_MCUX_COMPONENT_device.system ON)
4040
set(CONFIG_MCUX_COMPONENT_device.CMSIS ON)
4141
set(CONFIG_MCUX_COMPONENT_driver.clock ON)
42-
set(CONFIG_MCUX_COMPONENT_driver.power ON)
42+
43+
if((NOT CONFIG_SOC_MIMXRT798S_HIFI1) AND (NOT CONFIG_SOC_MIMXRT798S_HIFI4))
44+
set(CONFIG_MCUX_COMPONENT_driver.power ON)
45+
endif()
46+
4347
set(CONFIG_MCUX_COMPONENT_driver.reset ON)
4448
set(CONFIG_MCUX_COMPONENT_driver.memory ON)
4549

modules/hal_nxp/mcux/mcux-sdk-ng/drivers/CMakeLists.txt

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@ function(set_variable_ifdef feature_toggle variable)
99
endfunction()
1010

1111
# fsl_common driver
12-
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common.c
13-
${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_arm.c)
12+
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common.c)
1413
zephyr_include_directories(${MCUX_SDK_NG_DIR}/drivers/common)
1514

15+
if(CONFIG_ARCH STREQUAL "xtensa")
16+
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_dsp.c)
17+
elseif(CONFIG_ARCH STREQUAL "arm")
18+
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_arm.c)
19+
endif()
20+
1621
set_variable_ifdef(CONFIG_HWINFO_MCUX_SRC_V2 CONFIG_MCUX_COMPONENT_driver.src_2)
1722
set_variable_ifdef(CONFIG_GPIO_MCUX_IGPIO CONFIG_MCUX_COMPONENT_driver.igpio)
1823
set_variable_ifdef(CONFIG_ADC_MCUX_LPADC CONFIG_MCUX_COMPONENT_driver.lpadc)

0 commit comments

Comments
 (0)