From 80f2475a89cace749f76806e7b356ddbad7e838d Mon Sep 17 00:00:00 2001 From: Michael Schwarcz Date: Thu, 3 Jan 2019 13:03:33 +0200 Subject: [PATCH] CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets - TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation. (cherry picked from commit d3f7abdb7c109517e6a71daed8bae63ad6436afc) --- cmsis/TARGET_CORTEX_M/mbed_tz_context.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmsis/TARGET_CORTEX_M/mbed_tz_context.c b/cmsis/TARGET_CORTEX_M/mbed_tz_context.c index 8e9541f75d..17bf625afe 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 !TARGET_TFM + #if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U) #include "RTE_Components.h" @@ -201,3 +203,5 @@ uint32_t TZ_StoreContext_S (TZ_MemoryId_t id) { return 1U; // Success } #endif + +#endif // !TARGET_TFM