support stm8

1. see: TencentOS-tiny\board\STM8L052R8T6\IAR\hello_world
2. compile/debug/run with IAR for STM8
This commit is contained in:
daishengdong
2020-02-15 16:39:00 +08:00
parent 59e403891a
commit 405e5d970a
169 changed files with 49472 additions and 550 deletions

View File

@@ -21,8 +21,8 @@
// function with __API__ prefix, api for user
#define __API__
// function with __KERNEL__ prefix, only for kernel
#define __KERNEL__
// function with __KNL__ prefix, only for kernel
#define __KNL__
// function with __HOOK__ prefix, should be implemented by user
#define __HOOK__
@@ -80,6 +80,7 @@
#define __NO_RETURN__ __attribute__((__noreturn__))
#define __NAKED__ __attribute__((naked))
#define __WEAK__ __attribute__((weak))
/*------------------ ICC Compiler ----------------------*/
#elif defined(__ICCARM__) || defined(__ICC430__) // __IAR_SYSTEMS_ICC__
@@ -102,6 +103,27 @@
#define __NAKED__
#define __WEAK__ __weak
/*------------------ ICC Compiler for STM8 ----------------------*/
#elif defined(__IAR_SYSTEMS_ICC__)
#define __ASM__ __asm
#define __VOLATILE__ volatile
#define __INLINE__ inline
#define __STATIC__ static
#define __STATIC_INLINE__ static inline
#define likely(x) (x)
#define unlikely(x) (x)
#define __UNUSED__
#define __USED__
#define __PACKED__
#define __ALIGNED__(x)
#define __PURE__
#define __CONST__
#define __NO_RETURN__
#define __NAKED__
#define __WEAK__ __weak
/*------------------ GNU Compiler ----------------------*/
#elif defined(__GNUC__)