Skip to content

Commit ca95d3c

Browse files
committed
nrf_security: Adapt to the TF-M STD configuration
TF-M has an option to select if STD functions like printf are available with CONFIG_TFM_INCLUDE_STDLIBC. MbedlTLS also has a relevant option as well: MBEDTLS_PLATFORM_NO_STD_FUNCTIONS This makes sure that when inside the TF-M build no STD functions are available we set the appropriate configuration in mbedTLS. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
1 parent 3c176ea commit ca95d3c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

subsys/nrf_security/configs/psa_crypto_config.h.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
/* TF-M */
2828
#cmakedefine MBEDTLS_PSA_CRYPTO_SPM
2929

30+
#if defined(__NRF_TFM__) && \
31+
!defined(CONFIG_TFM_INCLUDE_STDLIBC) && \
32+
!defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS)
33+
#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
34+
#endif
35+
3036
/* RSA */
3137
#cmakedefine PSA_MAX_RSA_KEY_BITS @PSA_MAX_RSA_KEY_BITS@
3238

0 commit comments

Comments
 (0)