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:
Ioannis Glaropoulos 2021-05-08 23:40:07 +02:00 committed by Kumar Gala
parent d0073fdf7e
commit c5b4094cfb
5 changed files with 20 additions and 1 deletions

View file

@ -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}

View 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
)

View file

@ -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
)

View file

@ -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
)

View file

@ -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
)