drivers: entropy: fix TF-M enabled build with MbedTLS 3.6.0
This fixes the compilation of entropy_psa_crypto.c that failed when trying to include the MbedTLS configuration. Inherit the needed include folders and definitions from tfm_api. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This commit is contained in:
parent
8cd04a50e8
commit
43651979fc
2 changed files with 3 additions and 7 deletions
|
@ -34,8 +34,4 @@ zephyr_library_sources_ifdef(CONFIG_ENTROPY_GECKO_SE entropy_gecko_se.
|
||||||
zephyr_library_sources_ifdef(CONFIG_ENTROPY_PSA_CRYPTO_RNG entropy_psa_crypto.c)
|
zephyr_library_sources_ifdef(CONFIG_ENTROPY_PSA_CRYPTO_RNG entropy_psa_crypto.c)
|
||||||
zephyr_library_sources_ifdef(CONFIG_ENTROPY_NPCX_DRBG entropy_npcx_drbg.c)
|
zephyr_library_sources_ifdef(CONFIG_ENTROPY_NPCX_DRBG entropy_npcx_drbg.c)
|
||||||
|
|
||||||
if (CONFIG_BUILD_WITH_TFM)
|
zephyr_library_link_libraries_ifdef(CONFIG_BUILD_WITH_TFM tfm_api)
|
||||||
target_include_directories(${ZEPHYR_CURRENT_LIBRARY} PRIVATE
|
|
||||||
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/interface/include
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -363,13 +363,13 @@ if (CONFIG_BUILD_WITH_TFM)
|
||||||
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM ${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c)
|
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM ${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(tfm_api PRIVATE
|
target_include_directories(tfm_api PUBLIC
|
||||||
${TFM_INTERFACE_INCLUDE_DIR}
|
${TFM_INTERFACE_INCLUDE_DIR}
|
||||||
${TFM_INTERFACE_INCLUDE_DIR}/crypto_keys
|
${TFM_INTERFACE_INCLUDE_DIR}/crypto_keys
|
||||||
${ZEPHYR_BASE}/modules/mbedtls/configs
|
${ZEPHYR_BASE}/modules/mbedtls/configs
|
||||||
)
|
)
|
||||||
# Pass down the MbedTLS configuration file to use.
|
# Pass down the MbedTLS configuration file to use.
|
||||||
target_compile_definitions(tfm_api PRIVATE
|
target_compile_definitions(tfm_api PUBLIC
|
||||||
MBEDTLS_CONFIG_FILE="${CONFIG_MBEDTLS_CFG_FILE}"
|
MBEDTLS_CONFIG_FILE="${CONFIG_MBEDTLS_CFG_FILE}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue