Skip to content

Commit 5e24446

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 7abda99 commit 5e24446

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

modules/hal_nxp/mcux/mcux-sdk-ng/device/device.cmake

+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/drivers.cmake

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
# fsl_common driver
6-
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common.c
7-
${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_arm.c)
6+
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common.c)
87
zephyr_include_directories(${MCUX_SDK_NG_DIR}/drivers/common)
98

9+
if(CONFIG_ARCH STREQUAL "xtensa")
10+
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_dsp.c)
11+
elseif(CONFIG_ARCH STREQUAL "arm")
12+
zephyr_library_sources(${MCUX_SDK_NG_DIR}/drivers/common/fsl_common_arm.c)
13+
endif()
14+
1015
set_variable_ifdef(CONFIG_HWINFO_MCUX_SRC_V2 CONFIG_MCUX_COMPONENT_driver.src_2)
1116
set_variable_ifdef(CONFIG_GPIO_MCUX_IGPIO CONFIG_MCUX_COMPONENT_driver.igpio)
1217
set_variable_ifdef(CONFIG_ADC_MCUX_LPADC CONFIG_MCUX_COMPONENT_driver.lpadc)

0 commit comments

Comments
 (0)