[toolchain] Added support for the TASKING toolchain.
This commit is contained in:
parent
d514fea54a
commit
b1cdc3a2cb
|
@ -16,7 +16,7 @@
|
||||||
#define _IOC_WRITE 1U
|
#define _IOC_WRITE 1U
|
||||||
#define _IOC_READ 2U
|
#define _IOC_READ 2U
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined (_WIN32) && !defined (__TASKING__)
|
||||||
#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
|
#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
|
||||||
#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
|
#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
|
||||||
#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
|
#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
|
||||||
|
|
|
@ -192,6 +192,18 @@ typedef rt_base_t rt_off_t; /**< Type for offset */
|
||||||
#define RT_WEAK
|
#define RT_WEAK
|
||||||
#define rt_inline static inline
|
#define rt_inline static inline
|
||||||
#define RTT_API
|
#define RTT_API
|
||||||
|
#elif defined (__TASKING__)
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#define SECTION(x)
|
||||||
|
#define RT_UNUSED
|
||||||
|
#define RT_USED
|
||||||
|
#define PRAGMA(x) _Pragma(#x)
|
||||||
|
#define ALIGN(n)
|
||||||
|
#define RT_WEAK
|
||||||
|
#define rt_inline static inline
|
||||||
|
#define RTT_API
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error not supported tool chain
|
#error not supported tool chain
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -173,19 +173,22 @@ struct rt_thread main_thread;
|
||||||
void main_thread_entry(void *parameter)
|
void main_thread_entry(void *parameter)
|
||||||
{
|
{
|
||||||
extern int main(void);
|
extern int main(void);
|
||||||
extern int $Super$$main(void);
|
|
||||||
|
|
||||||
#ifdef RT_USING_COMPONENTS_INIT
|
#ifdef RT_USING_COMPONENTS_INIT
|
||||||
/* RT-Thread components initialization */
|
/* RT-Thread components initialization */
|
||||||
rt_components_init();
|
rt_components_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_SMP
|
#ifdef RT_USING_SMP
|
||||||
rt_hw_secondary_cpu_up();
|
rt_hw_secondary_cpu_up();
|
||||||
#endif
|
#endif
|
||||||
/* invoke system main function */
|
/* invoke system main function */
|
||||||
#if defined(__CC_ARM) || defined(__CLANG_ARM)
|
#if defined(__CC_ARM) || defined(__CLANG_ARM)
|
||||||
$Super$$main(); /* for ARMCC. */
|
{
|
||||||
#elif defined(__ICCARM__) || defined(__GNUC__)
|
extern int $Super$$main(void);
|
||||||
|
$Super$$main(); /* for ARMCC. */
|
||||||
|
}
|
||||||
|
#elif defined(__ICCARM__) || defined(__GNUC__) || defined(__TASKING__)
|
||||||
main();
|
main();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue