Skip to content

Commit fb35475

Browse files
Deepikac1728p9
authored andcommitted
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 d0a43b8)
1 parent ace5df9 commit fb35475

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmsis/TARGET_CORTEX_M/mbed_tz_context.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* limitations under the License.
2323
*/
2424

25+
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
26+
2527
#include "RTE_Components.h"
2628
#include CMSIS_device_header
2729
#include "tz_context.h"
@@ -198,3 +200,4 @@ uint32_t TZ_StoreContext_S (TZ_MemoryId_t id) {
198200

199201
return 1U; // Success
200202
}
203+
#endif

0 commit comments

Comments
 (0)