Browse Source

[toolchain] TASKING toolchain attributes update.

crazt 4 years ago
parent
commit
2517907b48
1 changed files with 5 additions and 7 deletions
  1. 5 7
      include/rtdef.h

+ 5 - 7
include/rtdef.h

@@ -193,17 +193,15 @@ typedef rt_base_t                       rt_off_t;       /**< Type for offset */
     #define rt_inline                   static inline
     #define rt_inline                   static inline
     #define RTT_API
     #define RTT_API
 #elif defined (__TASKING__)
 #elif defined (__TASKING__)
-
     #include <stdarg.h>
     #include <stdarg.h>
-    #define RT_SECTION(x)
-    #define RT_UNUSED
-    #define RT_USED
+    #define RT_SECTION(x)               __attribute__((section(x)))
+    #define RT_UNUSED                   __attribute__((unused))
+    #define RT_USED                     __attribute__((used, protect))
     #define PRAGMA(x)                   _Pragma(#x)
     #define PRAGMA(x)                   _Pragma(#x)
-    #define ALIGN(n)
-    #define RT_WEAK
+    #define ALIGN(n)                    __attribute__((aligned(n)))
+    #define RT_WEAK                     __attribute__((weak))
     #define rt_inline                   static inline
     #define rt_inline                   static inline
     #define RTT_API
     #define RTT_API
-
 #else
 #else
     #error not supported tool chain
     #error not supported tool chain
 #endif
 #endif