From 60f858429011f7983c3b2d0eb7790f313c7e6be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Tue, 21 May 2024 10:00:48 +0200 Subject: [PATCH] tfm: 54l: Add Zephyr's soc.c to the TF-M build system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Zephyr's soc.c to the TF-M build system and TF-M image. Zephyr's soc.c will do misc. power and clock configuration based on the Kconfig and DT of the non-secure image. But the non-secure image does not have access to NRF_OSCILLATORS or NRF_REGULATORS for security reasons. To solve this we have ported soc.c to TF-M. Signed-off-by: Sebastian Bøe --- .../tfm_boards/nrf54l15_cpuapp/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/trusted-firmware-m/tfm_boards/nrf54l15_cpuapp/CMakeLists.txt b/modules/trusted-firmware-m/tfm_boards/nrf54l15_cpuapp/CMakeLists.txt index ebe51e3c3d47..f81e9cee1853 100644 --- a/modules/trusted-firmware-m/tfm_boards/nrf54l15_cpuapp/CMakeLists.txt +++ b/modules/trusted-firmware-m/tfm_boards/nrf54l15_cpuapp/CMakeLists.txt @@ -15,6 +15,24 @@ target_include_directories(platform_s ${ZEPHYR_NRF_MODULE_DIR}/subsys/nrf_security/src/drivers/cracen/cracenpsa/include ) +target_sources(platform_s + PRIVATE + ${ZEPHYR_BASE}/soc/nordic/nrf54l/soc.c + ) + +target_include_directories(platform_s + PRIVATE + ${ZEPHYR_BASE}/modules/cmsis/ + ${ZEPHYR_BASE}/soc/nordic/nrf54l + ${ZEPHYR_BASE}/soc/nordic/common + ) + +# nrf54l15_enga_application.h should be defining __ICACHE_PRESENT, but +# it is not, until this is fixed we define it here. +target_compile_definitions(platform_s + PRIVATE + __ICACHE_PRESENT=1 + ) install(FILES ${CMAKE_CURRENT_LIST_DIR}/ns/cpuarch_ns.cmake DESTINATION ${INSTALL_PLATFORM_NS_DIR}