Modified for BG96
Fork of mbed-dev by
Diff: platform/mbed_toolchain.h
- Revision:
- 184:08ed48f1de7f
- Parent:
- 180:96ed750bd169
- Child:
- 186:707f6e361f3e
--- a/platform/mbed_toolchain.h Tue Mar 20 17:01:51 2018 +0000 +++ b/platform/mbed_toolchain.h Thu Apr 19 17:12:19 2018 +0100 @@ -376,13 +376,27 @@ #endif #endif +// Macro containing the filename part of the value of __FILE__. Defined as +// string literal. +#ifndef MBED_FILENAME +#if defined(__CC_ARM) +#define MBED_FILENAME __MODULE__ +#elif defined(__GNUC__) +#define MBED_FILENAME (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __builtin_strrchr(__FILE__, '\\') ? __builtin_strrchr(__FILE__, '\\') + 1 : __FILE__) +#elif defined(__ICCARM__) +#define MBED_FILENAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) +#else +#define MBED_FILENAME __FILE__ +#endif +#endif // #ifndef MBED_FILENAME + // FILEHANDLE declaration #if defined(TOOLCHAIN_ARM) #include <rt_sys.h> #endif #ifndef FILEHANDLE -typedef int FILEHANDLE; + typedef int FILEHANDLE; #endif // Backwards compatibility