1
1
# SPDX-License-Identifier: Apache-2.0
2
2
# Copyright 2022-2024 NXP
3
3
4
+ # Legacy MCUX SDK code is in mcux/mcux-sdk.
5
+ # MCUX SDK NG code is in mcux/mcux-sdk-ng.
6
+ # Use the right code by checking whether the platform is not supported by MCUX SDK NG.
7
+ if (DEFINED CONFIG_SOC_SDKNG_UNSUPPORTED )
8
+ set (MCUX_SDK_DIR ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk )
9
+ else ()
10
+ set (MCUX_SDK_DIR ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk-ng )
11
+ endif ()
12
+
4
13
# define part number for this driver
5
14
6
15
zephyr_compile_definitions_ifdef (CONFIG_NXP_88W8987
@@ -156,11 +165,13 @@ zephyr_library_compile_definitions(
156
165
CONFIG_OSA_DEBUG_ASSERT_ENABLED=1
157
166
)
158
167
159
- zephyr_library_sources (${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/utilities/misc_utilities/fsl_memcpy.S )
160
-
161
- zephyr_library_sources (${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/components/lists/fsl_component_generic_list.c )
162
-
163
- zephyr_library_sources (${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/components/osa/fsl_os_abstraction_zephyr.c )
168
+ # mcux-sdk and mcux-sdk-ng shar the wifi_nxp, the lists and osa is
169
+ # included in another way. Need add condition here.
170
+ if (DEFINED CONFIG_SOC_SDKNG_UNSUPPORTED )
171
+ zephyr_library_sources (${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/utilities/misc_utilities/fsl_memcpy.S )
172
+ zephyr_library_sources (${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/components/lists/fsl_component_generic_list.c )
173
+ zephyr_library_sources (${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/components/osa/fsl_os_abstraction_zephyr.c )
174
+ endif ()
164
175
165
176
zephyr_include_directories (
166
177
incl
@@ -181,11 +192,11 @@ zephyr_include_directories(
181
192
wifi_bt_firmware/nw61x
182
193
wifi_bt_firmware/8801
183
194
cli
184
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk /components/osa/
185
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk /components/lists/
186
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk /components/wifi_bt_module/AzureWave/tx_pwr_limits/
187
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk /components/wifi_bt_module/Murata/tx_pwr_limits/
188
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk /components/rpmsg/
195
+ ${MCUX_SDK_DIR} /components/osa/
196
+ ${MCUX_SDK_DIR} /components/lists/
197
+ ${MCUX_SDK_DIR} /components/wifi_bt_module/AzureWave/tx_pwr_limits/
198
+ ${MCUX_SDK_DIR} /components/wifi_bt_module/Murata/tx_pwr_limits/
199
+ ${MCUX_SDK_DIR} /components/rpmsg/
189
200
)
190
201
191
202
# OS abstraction layer source
@@ -275,15 +286,25 @@ endif()
275
286
if (CONFIG_NXP_RW610 )
276
287
zephyr_code_relocate (FILES
277
288
wifidriver/wifi-imu.c
278
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/drivers/imu/fsl_imu.c
289
+ ${MCUX_SDK_DIR} /drivers/imu/fsl_imu.c
290
+ # Only legacy SDK has this file.
279
291
${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/components/rpmsg/fsl_adapter_rfimu.c
280
292
LOCATION RAM_TEXT )
281
293
endif ()
282
294
283
295
zephyr_code_relocate (FILES
284
- ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/components/osa/fsl_os_abstraction_zephyr.c
296
+ ${MCUX_SDK_DIR} /components/osa/fsl_os_abstraction_zephyr.c
297
+ LOCATION RAM_TEXT )
298
+
299
+ if (DEFINED CONFIG_SOC_SDKNG_UNSUPPORTED )
300
+ zephyr_code_relocate (FILES
285
301
${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk/utilities/misc_utilities/fsl_memcpy.S
286
302
LOCATION RAM_TEXT )
303
+ else ()
304
+ zephyr_code_relocate (FILES
305
+ ${ZEPHYR_HAL_NXP_MODULE_DIR} /mcux/mcux-sdk-ng/components/misc_utilities/fsl_memcpy.S
306
+ LOCATION RAM_TEXT )
307
+ endif ()
287
308
288
309
file (GLOB ZPERF_SRC ${ZEPHYR_BASE} /subsys/net/lib/zperf/*.c )
289
310
zephyr_code_relocate (FILES ${ZPERF_SRC} LOCATION RAM_TEXT )
0 commit comments