The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: platform/mbed_toolchain.h
- Revision:
- 169:a7c7b631e539
- Parent:
- 165:d1b4690b3f8b
- Child:
- 170:e95d10626187
--- a/platform/mbed_toolchain.h Thu May 24 15:35:55 2018 +0100 +++ b/platform/mbed_toolchain.h Fri Jun 22 15:38:59 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 /** @}*/