File tree Expand file tree Collapse file tree
armchina/mps3/alcor/common/ns
nordic_nrf/common/core/ns Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,11 +116,8 @@ target_sources(platform_ns
116116 $<$<BOOL :${PLATFORM_DEFAULT_UART_STDOUT} >:${CMAKE_CURRENT_SOURCE_DIR} /platform /ext /common /uart_stdout .c >
117117)
118118
119- add_library (platform_ns_definitions INTERFACE )
120-
121- # these compile definitions must match on the secure and nonsecure side for security
122- target_compile_definitions (platform_ns_definitions
123- INTERFACE
119+ target_compile_definitions (platform_ns
120+ PUBLIC
124121 DOMAIN_NS=1
125122 $<$<BOOL :${PLATFORM_DEFAULT_CRYPTO_KEYS} >:PLATFORM_DEFAULT_CRYPTO_KEYS >
126123 $<$<STREQUAL :${CONFIG_TFM_FLOAT_ABI} ,hard >:CONFIG_TFM_FLOAT_ABI =2>
@@ -129,22 +126,10 @@ target_compile_definitions(platform_ns_definitions
129126 $<$<BOOL :${CONFIG_TFM_ENABLE_CP10CP11} >:CONFIG_TFM_ENABLE_CP10CP11 >
130127)
131128
132- target_link_libraries (platform_ns
133- PUBLIC
134- platform_ns_definitions
135- )
136-
137- if (DEFINED PLATFORM_CUSTOM_NS_FILES)
138- message (STATUS "Using PLATFORM_CUSTOM_NS_FILES: ${PLATFORM_CUSTOM_NS_FILES} " )
139- else ()
140- set (PLATFORM_CUSTOM_NS_FILES FALSE )
141- endif ()
142-
143129target_link_libraries (tfm_api_ns
144130 PUBLIC
145131 platform_region_defs
146- platform_ns_definitions
147- $<$<NOT :$<BOOL :${PLATFORM_CUSTOM_NS_FILES} >>:platform_ns >
132+ platform_ns
148133)
149134
150135if (BL2 AND PLATFORM_DEFAULT_IMAGE_SIGNING)
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ target_include_directories(platform_region_defs
1919 ${PLATFORM_DIR}
2020)
2121
22- target_sources (platform_ns
22+ target_sources (${NS_TARGET_NAME}
2323 PRIVATE
2424 ${CORSTONE300_COMMON_DIR} /device/source/startup_corstone300.c
2525 ${CORSTONE300_COMMON_DIR} /device/source/system_core_init.c
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ target_include_directories(platform_region_defs
2020
2121#========================= Platform common defs ===============================#
2222
23- target_sources (platform_ns
23+ target_sources (${NS_TARGET_NAME}
2424 PRIVATE
2525 ${CORSTONE310_COMMON_DIR} /device/source/startup_corstone310.c
2626 ${CORSTONE310_COMMON_DIR} /device/source/system_core_init.c
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ target_include_directories(platform_region_defs
2525
2626#========================= Platform common defs ===============================#
2727
28- target_sources (platform_ns
28+ target_sources (${NS_TARGET_NAME}
2929 PRIVATE
3030 device/source/startup_mps4_corstone3xx.c
3131 device/source/system_core_init.c
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ target_include_directories(platform_region_defs
2020 ${PLATFORM_DIR}
2121)
2222
23- target_sources (platform_ns
23+ target_sources (${NS_TARGET_NAME}
2424 PRIVATE
2525 ${ALCOR_COMMON_DIR} /device/source/startup_alcor_mps3.c
2626 ${ALCOR_COMMON_DIR} /device/source/system_core_init.c
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ target_compile_definitions(platform_region_defs
1717)
1818
1919# Startup sources should be put in the executable
20- target_sources (platform_ns
21- PUBLIC
20+ target_sources (${NS_TARGET_NAME}
21+ PRIVATE
2222 startup.c
2323 $<$<C_COMPILER_ID :GNU >:${CMAKE_CURRENT_SOURCE_DIR} /startup_ ${target} .c >
2424)
Original file line number Diff line number Diff line change @@ -133,11 +133,11 @@ target_sources(tfm_spm
133133
134134
135135if (NS)
136- target_sources (platform_ns
136+ target_sources (${NS_TARGET_NAME}
137137 PRIVATE
138138 ${CMAKE_CURRENT_SOURCE_DIR} /device/source/startup_m2351.c
139139 )
140- target_add_scatter_file (platform_ns
140+ target_add_scatter_file (${NS_TARGET_NAME}
141141 $<$<C_COMPILER_ID :ARMClang >:${CMAKE_CURRENT_SOURCE_DIR} /device /source /armclang /m2351_ns .sct >
142142 $<$<C_COMPILER_ID :GNU >:${CMAKE_CURRENT_SOURCE_DIR} /device /source /gcc /m2351_ns .ld >
143143 $<$<C_COMPILER_ID :IAR >:${CMAKE_CURRENT_SOURCE_DIR} /device /source /iar /m2351_ns .icf >
Original file line number Diff line number Diff line change @@ -135,11 +135,11 @@ target_sources(tfm_spm
135135
136136
137137if (NS)
138- target_sources (platform_ns
138+ target_sources (${NS_TARGET_NAME}
139139 PRIVATE
140140 ${CMAKE_CURRENT_SOURCE_DIR} /device/source/startup_m2354.c
141141 )
142- target_add_scatter_file (platform_ns
142+ target_add_scatter_file (${NS_TARGET_NAME}
143143 $<$<C_COMPILER_ID :ARMClang >:${CMAKE_CURRENT_SOURCE_DIR} /device /source /armclang /m2354_ns .sct >
144144 $<$<C_COMPILER_ID :GNU >:${CMAKE_CURRENT_SOURCE_DIR} /device /source /gcc /m2354_ns .ld >
145145 $<$<C_COMPILER_ID :IAR >:${CMAKE_CURRENT_SOURCE_DIR} /device /source /iar /m2354_ns .icf >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ target_sources(tfm_s
2121)
2222
2323if (NS)
24- target_sources (platform_ns
24+ target_sources (${NS_TARGET_NAME}
2525 PRIVATE
2626 ${STM_COMMON_DIR} /stm32h5xx/Device/Source/startup_stm32h5xx_ns.c
2727 )
You can’t perform that action at this time.
0 commit comments