Skip to content

Commit

Permalink
tfm: 54l: Add Zephyr's soc.c to the TF-M build system
Browse files Browse the repository at this point in the history
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 <sebastian.boe@nordicsemi.no>
  • Loading branch information
SebastianBoe authored and vili-nordic committed Jul 15, 2024
1 parent e146e40 commit 80a3907
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 80a3907

Please sign in to comment.