Modified for BG96
Fork of mbed-dev by
Diff: platform/mbed_toolchain.h
- Revision:
- 169:e3b6fe271b81
- Parent:
- 167:e84263d55307
- Child:
- 170:19eb464bc2be
diff -r 9672193075cf -r e3b6fe271b81 platform/mbed_toolchain.h --- a/platform/mbed_toolchain.h Thu Jul 06 15:42:05 2017 +0100 +++ b/platform/mbed_toolchain.h Wed Jul 19 17:31:21 2017 +0100 @@ -137,6 +137,27 @@ #endif #endif +/** MBED_NOINLINE + * Declare a function that must not be inlined. + * + * @code + * #include "mbed_toolchain.h" + * + * MBED_NOINLINE void foo() { + * + * } + * @endcode + */ +#ifndef MBED_NOINLINE +#if defined(__GNUC__) || defined(__clang__) || defined(__CC_ARM) +#define MBED_NOINLINE __attribute__((noinline)) +#elif defined(__ICCARM__) +#define MBED_NOINLINE _Pragma("inline=never") +#else +#define MBED_NOINLINE +#endif +#endif + /** MBED_FORCEINLINE * Declare a function that must always be inlined. Failure to inline * such a function will result in an error.