aboutsummaryrefslogtreecommitdiff
path: root/configs/config-tfm.h
diff options
context:
space:
mode:
authorDave Rodgman <dave.rodgman@arm.com>2023-12-13 17:23:46 +0000
committerDave Rodgman <dave.rodgman@arm.com>2024-01-03 11:10:18 +0000
commit13d2633126ca890a8711712fc4eeecb69157140b (patch)
tree745f281cb067723eb6eec64c998ad9aef1289900 /configs/config-tfm.h
parent1c91057fabf7b1276f4b7d5279ff59b8156c3b48 (diff)
downloadmbedtls-13d2633126ca890a8711712fc4eeecb69157140b.zip
mbedtls-13d2633126ca890a8711712fc4eeecb69157140b.tar.gz
mbedtls-13d2633126ca890a8711712fc4eeecb69157140b.tar.bz2
Fix MBEDTLS_NO_PLATFORM_ENTROPY for baremetal aarch64 with armclang
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
Diffstat (limited to 'configs/config-tfm.h')
-rw-r--r--configs/config-tfm.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/configs/config-tfm.h b/configs/config-tfm.h
index 197b808..8ed0792 100644
--- a/configs/config-tfm.h
+++ b/configs/config-tfm.h
@@ -21,9 +21,6 @@
/* MBEDTLS_PSA_CRYPTO_SPM needs third-party files, so disable it. */
#undef MBEDTLS_PSA_CRYPTO_SPM
-/* Use built-in platform entropy functions (TF-M provides its own). */
-#undef MBEDTLS_NO_PLATFORM_ENTROPY
-
/* Disable buffer-based memory allocator. This isn't strictly required,
* but using the native allocator is faster and works better with
* memory management analysis frameworks such as ASan. */
@@ -53,10 +50,14 @@
/*
* In order to get an example config that works cleanly out-of-the-box
* for both baremetal and non-baremetal builds, we detect baremetal builds
- * and set this variable automatically.
+ * (either IAR, Arm compiler or __ARM_EABI__ defined), and adjust some
+ * variables accordingly.
*/
-#if defined(__IAR_SYSTEMS_ICC__) || defined(__ARM_EABI__)
+#if defined(__IAR_SYSTEMS_ICC__) || defined(__ARMCC_VERSION) || defined(__ARM_EABI__)
#define MBEDTLS_NO_PLATFORM_ENTROPY
+#else
+/* Use built-in platform entropy functions (TF-M provides its own). */
+#undef MBEDTLS_NO_PLATFORM_ENTROPY
#endif
/***********************************************************************