modules: tf-m: do not expose TF-M NS interface include directories publicly
Instead of exposing publicly the TF-M NS interface include directories, we include them when we build relevant projects. This is required, as the TF-M include directories contains psa crypto sources that are also provided by the mbedtls crypto module. The downside of this solution is that the TF-M includes need to be added explicitly in each application that uses TF-M APIs. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
d0073fdf7e
commit
c5b4094cfb
5 changed files with 20 additions and 1 deletions
|
|
@ -241,10 +241,13 @@ function(trusted_firmware_build)
|
|||
zephyr_library_sources_ifndef(CONFIG_TFM_PSA_TEST_NONE src/zephyr_tfm_psa_test.c)
|
||||
|
||||
zephyr_include_directories(
|
||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m/interface/include
|
||||
${TFM_GENERATED_INCLUDES}
|
||||
)
|
||||
|
||||
target_include_directories(tfm_api PRIVATE
|
||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m/interface/include
|
||||
)
|
||||
|
||||
zephyr_library_link_libraries(
|
||||
${PSA_TEST_VAL_FILE}
|
||||
${PSA_TEST_PAL_FILE}
|
||||
|
|
|
|||
|
|
@ -14,3 +14,7 @@ target_sources(app PRIVATE src/shell.c)
|
|||
target_sources(app PRIVATE src/util_app_cfg.c)
|
||||
target_sources(app PRIVATE src/util_app_log.c)
|
||||
target_sources(app PRIVATE src/util_sformat.c)
|
||||
|
||||
target_include_directories(app PRIVATE
|
||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m/interface/include
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,3 +7,7 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|||
project(tfm_ipc)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
target_include_directories(app PRIVATE
|
||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m/interface/include
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,3 +11,7 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|||
project(tfm_psa_storage_test)
|
||||
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
target_include_directories(app PRIVATE
|
||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m/interface/include
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,3 +11,7 @@ project(NONE)
|
|||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
||||
|
||||
target_include_directories(app PRIVATE
|
||||
${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/trusted-firmware-m/interface/include
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue