modules: Update source, lib and include path for TF-M interface files
Update source lib and include path for TF-M interface files. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no> Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
This commit is contained in:
parent
8b257c058d
commit
a14f42a817
10 changed files with 21 additions and 24 deletions
|
@ -10,6 +10,6 @@ endif()
|
|||
if(CONFIG_BUILD_WITH_TFM)
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
#Execute post build script postbuild.sh
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -346,14 +346,14 @@ can be generated using ``b_u585i_iot02a_ns`` as build target.
|
|||
|
||||
$ west build -b b_u585i_iot02a_ns path/to/source/directory
|
||||
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
|
||||
is run automatically in a post-build step to make some required flash layout changes.
|
||||
|
||||
Once the build is completed, run the following script to initialize the option bytes.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ build/tfm/regression.sh
|
||||
$ build/tfm/api_ns/regression.sh
|
||||
|
||||
Finally, to flash the board, run:
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@ endif()
|
|||
if (CONFIG_BUILD_WITH_TFM)
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
#Execute post build script postbuild.sh
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -338,7 +338,7 @@ can be generated using ``nucleo_l552ze_q_ns`` as build target.
|
|||
|
||||
$ west build -b nucleo_l552ze_q_ns path/to/source/directory
|
||||
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
|
||||
is run automatically in a post-build step to make some required flash layout changes.
|
||||
|
||||
Once the build is completed, run the following script to initialize the option bytes.
|
||||
|
|
|
@ -308,7 +308,7 @@ can be generated using ``nucleo_u575zi_q_ns`` as build target.
|
|||
|
||||
$ west build -b nucleo_u575zi_q_ns path/to/source/directory
|
||||
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
|
||||
is run automatically in a post-build step to make some required flash layout changes.
|
||||
|
||||
Once the build is completed, run the following script to initialize the option bytes.
|
||||
|
|
|
@ -9,6 +9,6 @@ endif()
|
|||
if(CONFIG_BUILD_WITH_TFM)
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
#Execute post build script postbuild.sh
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -342,7 +342,7 @@ can be generated using ``nucleo_u5a5zj_q_ns`` as build target.
|
|||
|
||||
$ west build -b nucleo_u5a5zj_q_ns path/to/source/directory
|
||||
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
|
||||
is run automatically in a post-build step to make some required flash layout changes.
|
||||
|
||||
Once the build is completed, run the following script to initialize the option bytes.
|
||||
|
|
|
@ -10,6 +10,6 @@ endif()
|
|||
if(CONFIG_BUILD_WITH_TFM)
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
#Execute post build script postbuild.sh
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -340,7 +340,7 @@ can be generated using ``stm32l562e_dk_ns`` as build target.
|
|||
|
||||
$ west build -b stm32l562e_dk_ns path/to/source/directory
|
||||
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
|
||||
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
|
||||
is run automatically in a post-build step to make some required flash layout changes.
|
||||
|
||||
Once the build is completed, run the following script to initialize the option bytes.
|
||||
|
|
|
@ -181,11 +181,12 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
set(TFM_TEST_REPO_PATH ${ZEPHYR_CURRENT_MODULE_DIR}/../tf-m-tests)
|
||||
set(PSA_ARCH_TESTS_PATH ${ZEPHYR_CURRENT_MODULE_DIR}/../psa-arch-tests)
|
||||
|
||||
set(VENEERS_FILE ${TFM_BINARY_DIR}/secure_fw/s_veneers.o)
|
||||
set(TFM_INTERFACE_SOURCE_DIR ${TFM_BINARY_DIR}/api_ns/interface/src)
|
||||
set(TFM_INTERFACE_INCLUDE_DIR ${TFM_BINARY_DIR}/api_ns/interface/include)
|
||||
set(TFM_INTERFACE_LIB_DIR ${TFM_BINARY_DIR}/api_ns/interface/lib)
|
||||
|
||||
set(TFM_API_NS_PATH ${TFM_BINARY_DIR}/tf-m-tests/app/libtfm_api_ns.a)
|
||||
set(PLATFORM_NS_FILE ${TFM_BINARY_DIR}/platform/ns/libplatform_ns.a)
|
||||
set(TFM_GENERATED_INCLUDES ${TFM_BINARY_DIR}/generated/interface/include)
|
||||
set(TFM_INTERFACE_SOURCE_DIR ${TFM_BINARY_DIR}/install/interface/src)
|
||||
|
||||
if (TFM_PSA_TEST_SUITE)
|
||||
set(PSA_TEST_VAL_FILE ${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests/val/val_nspe.a)
|
||||
|
@ -213,9 +214,7 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
set(TFM_S_NS_SIGNED_BIN_FILE ${TFM_BINARY_DIR}/bin/tfm_s_ns_signed.bin)
|
||||
|
||||
set(BUILD_BYPRODUCTS
|
||||
${VENEERS_FILE}
|
||||
${TFM_API_NS_PATH}
|
||||
${TFM_GENERATED_INCLUDES}/psa_manifest/sid.h
|
||||
${PSA_TEST_VAL_FILE}
|
||||
${PSA_TEST_PAL_FILE}
|
||||
${PSA_TEST_COMBINE_FILE}
|
||||
|
@ -232,13 +231,15 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
${TFM_NS_SIGNED_BIN_FILE}
|
||||
${TFM_S_NS_SIGNED_BIN_FILE}
|
||||
|
||||
${TFM_INTERFACE_LIB_DIR}/s_veneers.o
|
||||
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_attest_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_crypto_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_fwu_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_its_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_platform_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_ps_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_psa_ns_api.c
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_tz_psa_ns_api.c
|
||||
|
||||
# Specific to nordic_nrf platform
|
||||
${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c
|
||||
|
@ -434,7 +435,7 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_INITIAL_ATTESTATION ${TFM_INTERFACE_SOURCE_DIR}/tfm_attest_api.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_FIRMWARE_UPDATE ${TFM_INTERFACE_SOURCE_DIR}/tfm_fwu_api.c)
|
||||
|
||||
zephyr_library_sources(${TFM_INTERFACE_SOURCE_DIR}/tfm_psa_ns_api.c)
|
||||
zephyr_library_sources(${TFM_INTERFACE_SOURCE_DIR}/tfm_tz_psa_ns_api.c)
|
||||
|
||||
if(CONFIG_SOC_FAMILY_NRF)
|
||||
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM ${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c)
|
||||
|
@ -447,17 +448,13 @@ if (CONFIG_BUILD_WITH_TFM)
|
|||
)
|
||||
endif()
|
||||
|
||||
zephyr_include_directories(
|
||||
${TFM_GENERATED_INCLUDES}
|
||||
)
|
||||
|
||||
target_include_directories(tfm_api PRIVATE
|
||||
${TFM_BINARY_DIR}/install/interface/include
|
||||
${TFM_BINARY_DIR}/install/interface/include/crypto_keys
|
||||
${TFM_INTERFACE_INCLUDE_DIR}
|
||||
${TFM_INTERFACE_INCLUDE_DIR}/crypto_keys
|
||||
)
|
||||
|
||||
zephyr_library_link_libraries(
|
||||
${VENEERS_FILE}
|
||||
${TFM_INTERFACE_LIB_DIR}/s_veneers.o
|
||||
)
|
||||
|
||||
# To ensure that generated include files are created before they are used.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue