From 856989d5d41722dc051287c4fd8917f7d72ce20f Mon Sep 17 00:00:00 2001 From: Deepika Date: Wed, 28 Mar 2018 11:31:18 -0500 Subject: [PATCH] CMSIS/RTX: Patch to conditionally compile tz_context.c should be compiled only for secure world, definition of API's in tz_context.h should be part of secure binary/bootloader when building mbed-os as non-secure (Cherry picked from d0a43b8af0eef4775ec4c3da5994ecceb9ed4558) (cherry picked from commit fb354752eb69403ad503c8e53da67da6483776d6) --- cmsis/TARGET_CORTEX_M/mbed_tz_context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmsis/TARGET_CORTEX_M/mbed_tz_context.c b/cmsis/TARGET_CORTEX_M/mbed_tz_context.c index e2e82942f8..8e9541f75d 100644 --- a/cmsis/TARGET_CORTEX_M/mbed_tz_context.c +++ b/cmsis/TARGET_CORTEX_M/mbed_tz_context.c @@ -22,6 +22,8 @@ * limitations under the License. */ +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) + #include "RTE_Components.h" #include CMSIS_device_header #include "tz_context.h" @@ -198,3 +200,4 @@ uint32_t TZ_StoreContext_S (TZ_MemoryId_t id) { return 1U; // Success } +#endif