Modified for BG96
Fork of mbed-dev by
Diff: platform/mbed_toolchain.h
- Revision:
- 186:707f6e361f3e
- Parent:
- 184:08ed48f1de7f
- Child:
- 187:0387e8f68319
--- a/platform/mbed_toolchain.h Thu Apr 19 17:12:19 2018 +0100 +++ b/platform/mbed_toolchain.h Fri Jun 22 16:45:37 2018 +0100 @@ -412,6 +412,27 @@ #define EXTERN extern #endif +/** MBED_NONSECURE_ENTRY + * Declare a function that can be called from non-secure world or secure world + * + * @code + * #include "mbed_toolchain.h" + * + * MBED_NONSECURE_ENTRY void foo() { + * + * } + * @endcode + */ +#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3L) +#if defined (__ICCARM__) +#define MBED_NONSECURE_ENTRY __cmse_nonsecure_entry +#else +#define MBED_NONSECURE_ENTRY __attribute__((cmse_nonsecure_entry)) +#endif +#else +#define MBED_NONSECURE_ENTRY +#endif + #endif /** @}*/