Skip to content

Commit a7d8d77

Browse files
committed
[hopefully fromlist] platform: nrf: Fix startup file issue for nRF54L
Recently a commit got introduced which changed the target of the startup*.c files to be the platform_ns instead of the tfm_ns. This had issues with the nRF devices and was initially reverted, the current commit tries to fix the issues. It does the following: It changes the startup*.c files targets to be platform_ns for all the files and also adds them to the target as PRIVATE instead of PUBLIC to avoid having multiple object files for all the targets which link to platform_ns. It adds a workaround for the PSA arhitecture tests which was failing to build because the required __Vectors symbol was dropped the relevant file which includes it was not added to the platform_ns target. The __Vectors is required by the linker script tfm_common_ns.ld used byt the PSA architecture tests. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 00a106c commit a7d8d77

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

platform/ext/target/nordic_nrf/common/core/ns/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ endif()
3636

3737
# Startup sources should be put in the executable
3838
target_sources(platform_ns
39-
PUBLIC
39+
PRIVATE
4040
startup.c
4141
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/${startup_file}>
4242
)
4343

4444
if(HAS_RRAMC)
45-
target_sources(${NS_TARGET_NAME}
45+
target_sources(platform_ns
4646
PRIVATE
4747
$<$<C_COMPILER_ID:GNU>:${CMAKE_CURRENT_SOURCE_DIR}/startup_nrf54l_common.c>
4848
)
@@ -71,9 +71,16 @@ target_sources(platform_ns
7171
# already required for any image that runs on a nrf device.
7272
target_link_libraries(platform_ns
7373
PUBLIC
74-
-Wl,--undefined=SystemInit
74+
-Wl,--undefined=SystemInit
7575
)
7676

77+
if(TEST_PSA_API)
78+
target_link_libraries(platform_ns
79+
PUBLIC
80+
-Wl,--undefined=__Vectors
81+
)
82+
endif()
83+
7784
target_include_directories(platform_ns
7885
PUBLIC
7986
.

0 commit comments

Comments
 (0)