Skip to content

Commit 884b454

Browse files
committed
mbedtls: fix mbed-psa link missing
mbed-psa provides one mbed psa implementation which mbedtls needs to link. For example, mbedtls_hardware_poll (mbedtls mbed_trng.cpp) invokes trng_init and friends which are implemented in mbed-psa psa_hrng.c.
1 parent df28d42 commit 884b454

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

connectivity/mbedtls/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ target_compile_definitions(mbed-mbedtls
117117

118118
target_link_libraries(mbed-mbedtls PUBLIC mbed-core-flags)
119119

120+
# Link Mbed's PSA implementation on enabled
121+
if(("FEATURE_EXPERIMENTAL_API=1" IN_LIST MBED_TARGET_DEFINITIONS) AND
122+
("FEATURE_PSA=1" IN_LIST MBED_TARGET_DEFINITIONS))
123+
target_link_libraries(mbed-mbedtls PUBLIC mbed-psa)
124+
endif()
125+
120126
# Workaround for https://github.com/ARMmbed/mbedtls/issues/1077
121127
# which affects cores without __thumb2__ set by the compiler
122128
# due to the lack of full Thumb-2 support

0 commit comments

Comments
 (0)