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.

Revision:
130:d75b3fe1f5cb
Parent:
128:9bcdf88f62b0
Child:
138:093f2bd7b9eb
--- a/platform/toolchain.h	Tue Nov 08 17:28:34 2016 +0000
+++ b/platform/toolchain.h	Thu Nov 24 11:01:25 2016 +0000
@@ -19,6 +19,8 @@
 #ifndef MBED_TOOLCHAIN_H
 #define MBED_TOOLCHAIN_H
 
+#include "mbed_preprocessor.h"
+
 
 // Warning for unsupported compilers
 #if !defined(__GNUC__)   /* GCC        */ \
@@ -65,8 +67,7 @@
  */
 #ifndef MBED_ALIGN
 #if defined(__ICCARM__)
-#define _MBED_ALIGN(N) _Pragma(#N)
-#define MBED_ALIGN(N) _MBED_ALIGN(data_alignment=N)
+#define MBED_ALIGN(N) _Pragma(MBED_STRINGIFY(data_alignment=N))
 #else
 #define MBED_ALIGN(N) __attribute__((aligned(N)))
 #endif
@@ -219,10 +220,10 @@
  *  @endcode
  */
 #ifndef MBED_DEPRECATED
-#if defined(__GNUC__) || defined(__clang__)
+#if defined(__CC_ARM)
+#define MBED_DEPRECATED(M) __attribute__((deprecated))
+#elif defined(__GNUC__) || defined(__clang__)
 #define MBED_DEPRECATED(M) __attribute__((deprecated(M)))
-#elif defined(__CC_ARM)
-#define MBED_DEPRECATED(M) __attribute__((deprecated))
 #else
 #define MBED_DEPRECATED(M)
 #endif