zephyr/soc/nordic/CMakeLists.txt
Grzegorz Swiderski f16b33e902 soc: nordic: Fix undefined z_arm_platform_init
Fixes #71511
Follow-up to #70977

Update the approach by moving the `PROVIDE` directive to a separate
linker script added using `zephyr_linker_sources()`. This makes the
change more likely to propagate to existing samples which are using
CONFIG_CUSTOM_LINKER_SCRIPT.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-19 16:55:13 +00:00

39 lines
1 KiB
CMake

# SPDX-License-Identifier: Apache-2.0
zephyr_library()
if(CONFIG_ARM)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "SoC Linker script")
endif()
zephyr_library_sources(
validate_base_addresses.c
validate_enabled_instances.c
)
if(CONFIG_SOC_HAS_TIMING_FUNCTIONS AND NOT CONFIG_BOARD_HAS_TIMING_FUNCTIONS)
if(CONFIG_TIMING_FUNCTIONS)
# Use nRF-specific timing calculations only if DWT is not present
if(NOT CONFIG_CORTEX_M_DWT)
zephyr_library_sources(timing.c)
endif()
endif()
endif()
if(CONFIG_BUILD_WITH_TFM)
set_property(TARGET zephyr_property_target
APPEND PROPERTY TFM_CMAKE_OPTIONS -DHAL_NORDIC_PATH=${ZEPHYR_HAL_NORDIC_MODULE_DIR}
)
set_property(TARGET zephyr_property_target
APPEND PROPERTY TFM_CMAKE_OPTIONS -DZEPHYR_BASE=${ZEPHYR_BASE}
)
set_property(TARGET zephyr_property_target
APPEND PROPERTY TFM_CMAKE_OPTIONS -DNRF_NS_STORAGE=${CONFIG_TFM_NRF_NS_STORAGE}
)
endif()
add_subdirectory(${SOC_SERIES})
add_subdirectory(common)