@@ -11,16 +11,33 @@ if(NOT DEFINED NRFX_DIR)
1111 set (NRFX_DIR ${ZEPHYR_CURRENT_MODULE_DIR} /nrfx CACHE PATH "nrfx Directory" )
1212endif ()
1313
14+ if (NOT DEFINED CONFIG_SOC_NORDIC_BSP_NAME)
15+ message (FATAL_ERROR "CONFIG_SOC_NORDIC_BSP_NAME has to be defined." )
16+ endif ()
17+
1418set (INC_DIR ${NRFX_DIR} /drivers/include )
1519set (SRC_DIR ${NRFX_DIR} /drivers/src)
16- set (MDK_DIR ${NRFX_DIR} /mdk )
20+ set (BSP_DIR ${NRFX_DIR} /bsp )
1721set (HELPERS_DIR ${NRFX_DIR} /helpers)
22+ set (SOC_DIR ${BSP_DIR} /${CONFIG_SOC_NORDIC_BSP_NAME} )
23+ set (MDK_DIR ${SOC_DIR} /mdk)
24+
25+ zephyr_compile_definitions(NRFX_BSP_NRF_PATH="${CONFIG_SOC_NORDIC_BSP_NAME} /mdk/nrf.h" )
26+ zephyr_compile_definitions(NRFX_BSP_ERRATAS_PATH="${CONFIG_SOC_NORDIC_BSP_NAME} /mdk/nrf_erratas.h" )
27+ zephyr_compile_definitions(NRFX_BSP_SOC_IRQS_PATH="${CONFIG_SOC_NORDIC_BSP_NAME} /soc/nrfx_irqs.h" )
28+ zephyr_compile_definitions(NRFX_BSP_NRFX_EXT_PATH="${CONFIG_SOC_NORDIC_BSP_NAME} /nrfx_ext.h" )
29+ zephyr_compile_definitions(NRFX_BSP_NRFX_COREDEP_PATH="${CONFIG_SOC_NORDIC_BSP_NAME} /soc/nrfx_coredep_defs.h" )
1830
1931zephyr_include_directories(${NRFX_DIR} )
2032zephyr_include_directories(${INC_DIR} )
33+ zephyr_include_directories(${BSP_DIR} )
34+ zephyr_include_directories(${SOC_DIR} )
35+ zephyr_include_directories(${SOC_DIR} /templates)
2136zephyr_include_directories(${MDK_DIR} )
2237zephyr_include_directories(.)
2338
39+ include (${SOC_DIR} /zephyr/nrfx.cmake OPTIONAL )
40+
2441# Define MDK defines globally
2542zephyr_compile_definitions_ifdef(CONFIG_SOC_SERIES_NRF51X NRF51)
2643zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF51822_QFAA NRF51422_XXAA)
@@ -215,13 +232,13 @@ endif()
215232
216233if (CONFIG_SOC_COMPATIBLE_NRF54LX AND CONFIG_NRFX_GPPI)
217234 zephyr_library_sources(${HELPERS_DIR} /nrfx_gppi_dppi_ppib_lumos.c)
218- zephyr_library_sources(${NRFX_DIR } /soc/interconnect/dppic_ppib/nrfx_interconnect_dppic_ppib.c)
235+ zephyr_library_sources(${SOC_DIR } /soc/interconnect/dppic_ppib/nrfx_interconnect_dppic_ppib.c)
219236endif ()
220237
221238if (CONFIG_SOC_SERIES_NRF54HX AND CONFIG_NRFX_GPPI)
222239 zephyr_library_sources(${HELPERS_DIR} /nrfx_gppi_dppi_ppib.c)
223- zephyr_library_sources(${NRFX_DIR } /soc/interconnect/apb/nrfx_interconnect_apb.c)
224- zephyr_library_sources(${NRFX_DIR } /soc/interconnect/ipct/nrfx_interconnect_ipct.c)
240+ zephyr_library_sources(${SOC_DIR } /soc/interconnect/apb/nrfx_interconnect_apb.c)
241+ zephyr_library_sources(${SOC_DIR } /soc/interconnect/ipct/nrfx_interconnect_ipct.c)
225242endif ()
226243
227244# Get the SVD file for the current SoC
0 commit comments