Skip to content

Commit 5a12632

Browse files
Vge0rgedegjorva
authored andcommitted
[nrf noup] tf-m: Refactor support for external PSA core
nrf-quash! [nrf noup] tf-m: Enable support for external PSA core The cmake files which handle the external PSA core are in the nrf_security folder of sdk-nrf. Instead of using a relative path to include these files into the TF-M build use the new variable which points to the tfm_boards folder in sdk-nrf. Ref: NCSDK-36186 Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
1 parent 5376c3c commit 5a12632

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

cmake/install.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ endif()
8383

8484
if (TFM_PARTITION_CRYPTO)
8585
if(PSA_CRYPTO_EXTERNAL_CORE)
86-
include(${TARGET_PLATFORM_PATH}/../external_core_install.cmake)
86+
include(${TFM_BOARDS_NRF_DIR}/external_core_install.cmake)
8787
install(FILES ${INTERFACE_INC_DIR}/tfm_crypto_defs.h
8888
DESTINATION ${INSTALL_INTERFACE_INC_DIR})
8989
else()

cmake/spe-CMakeLists.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ target_sources(tfm_api_ns
4040

4141
# Include interface headers exported by TF-M
4242
if(PSA_CRYPTO_EXTERNAL_CORE)
43-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
43+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
4444
else()
4545
target_include_directories(tfm_api_ns
4646
PUBLIC

interface/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/psa/framework_feature.h.in
2020
add_library(psa_interface INTERFACE)
2121

2222
if(PSA_CRYPTO_EXTERNAL_CORE)
23-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
23+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
2424
else()
2525
target_include_directories(psa_interface
2626
INTERFACE

secure_fw/partitions/crypto/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ target_include_directories(psa_crypto_config
2222
)
2323

2424
if(PSA_CRYPTO_EXTERNAL_CORE)
25-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
25+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
2626
else()
2727
target_compile_definitions(psa_crypto_config
2828
INTERFACE
@@ -34,7 +34,7 @@ endif()
3434
# This defines the configuration files for the users of the library directly
3535
add_library(psa_crypto_library_config INTERFACE)
3636
if(PSA_CRYPTO_EXTERNAL_CORE)
37-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
37+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
3838
else()
3939
target_compile_definitions(psa_crypto_library_config
4040
INTERFACE
@@ -92,7 +92,7 @@ target_include_directories(tfm_psa_rot_partition_crypto
9292
)
9393

9494
if(PSA_CRYPTO_EXTERNAL_CORE)
95-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
95+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
9696
else()
9797
target_include_directories(tfm_psa_rot_partition_crypto
9898
PRIVATE
@@ -141,7 +141,7 @@ target_link_libraries(tfm_config
141141
############################### MBEDCRYPTO #####################################
142142
add_library(crypto_service_mbedcrypto_config INTERFACE)
143143
if(PSA_CRYPTO_EXTERNAL_CORE)
144-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
144+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
145145
else()
146146
target_compile_definitions(crypto_service_mbedcrypto_config
147147
INTERFACE
@@ -200,7 +200,7 @@ target_include_directories(psa_crypto_library_config
200200
)
201201

202202
if(PSA_CRYPTO_EXTERNAL_CORE)
203-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
203+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
204204
else()
205205
target_include_directories(${MBEDTLS_TARGET_PREFIX}mbedcrypto
206206
PUBLIC

secure_fw/partitions/lib/runtime/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ target_include_directories(tfm_sprt
1717
)
1818

1919
if(PSA_CRYPTO_EXTERNAL_CORE)
20-
include(${TARGET_PLATFORM_PATH}/../external_core.cmake)
20+
include(${TFM_BOARDS_NRF_DIR}/external_core.cmake)
2121
endif()
2222

2323
target_sources(tfm_sprt

0 commit comments

Comments
 (0)