diff options
| author | tmmdh <[email protected]> | 2021-01-20 18:45:20 +0800 |
|---|---|---|
| committer | tmmdh <[email protected]> | 2021-01-20 18:45:20 +0800 |
| commit | 9db4d446382426d215ffe79f60920c98a8b1be53 (patch) | |
| tree | a3bd61199194d5f8251bf7ee889e22baedf5dc31 /components/libc/compilers/dlib | |
| parent | 55c0a9f27900d19556d52110be6397f3ee15a6c3 (diff) | |
| parent | afd575105d2fdd29fb003fb49c6e4f5446f824ce (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
Diffstat (limited to 'components/libc/compilers/dlib')
| -rw-r--r-- | components/libc/compilers/dlib/README.md | 7 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/SConscript | 2 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/sys/types.h | 13 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/sys/unistd.h | 7 |
4 files changed, 21 insertions, 8 deletions
diff --git a/components/libc/compilers/dlib/README.md b/components/libc/compilers/dlib/README.md index 846eb3f5c0..acd08f9074 100644 --- a/components/libc/compilers/dlib/README.md +++ b/components/libc/compilers/dlib/README.md @@ -1,4 +1,9 @@ -Dlib(IAR) porting for RT-Thread. +# DLIB (IAR) porting for RT-Thread Please define RT_USING_LIBC and compile RT-Thread with IAR compiler. + + +## More Information + +http://www.iarsys.co.jp/download/LMS2/arm/7502/ewarm7502doc/arm/doc/EWARM_DevelopmentGuide.ENU.pdf P.130
\ No newline at end of file diff --git a/components/libc/compilers/dlib/SConscript b/components/libc/compilers/dlib/SConscript index 456b762496..75a5812fab 100644 --- a/components/libc/compilers/dlib/SConscript +++ b/components/libc/compilers/dlib/SConscript @@ -20,7 +20,7 @@ if rtconfig.PLATFORM == 'iar': if LooseVersion(IARVersion()) < LooseVersion("8.20.1"): CPPDEFINES = CPPDEFINES + ['_DLIB_THREAD_SUPPORT'] - group = DefineGroup('dlib', src, depend = ['RT_USING_LIBC'], + group = DefineGroup('libc', src, depend = ['RT_USING_LIBC'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/components/libc/compilers/dlib/sys/types.h b/components/libc/compilers/dlib/sys/types.h index 001ace4dd2..7dbeddcaa9 100644 --- a/components/libc/compilers/dlib/sys/types.h +++ b/components/libc/compilers/dlib/sys/types.h @@ -5,20 +5,21 @@ * * Change Logs: * Date Author Notes + * 2020-12-16 Meco Man add useconds_t */ #ifndef __TYPES_H__ #define __TYPES_H__ #include <stdint.h> -#include <rtthread.h> -typedef rt_int32_t clockid_t; -typedef rt_int32_t key_t; /* Used for interprocess communication. */ -typedef rt_int32_t pid_t; /* Used for process IDs and process group IDs. */ +typedef int32_t clockid_t; +typedef int32_t key_t; /* Used for interprocess communication. */ +typedef int32_t pid_t; /* Used for process IDs and process group IDs. */ #ifndef ARCH_CPU_64BIT -typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ +typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ #else -typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */ +typedef long signed int ssize_t; /* Used for a count of bytes or an error indication. */ #endif +typedef unsigned long useconds_t; /* microseconds (unsigned) */ #endif diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h index 9564daba8d..6d99cd6c55 100644 --- a/components/libc/compilers/dlib/sys/unistd.h +++ b/components/libc/compilers/dlib/sys/unistd.h @@ -5,10 +5,14 @@ * * Change Logs: * Date Author Notes + * 2020-12-16 Meco Man add usleep */ #ifndef _SYS_UNISTD_H #define _SYS_UNISTD_H +#include <rtconfig.h> +#include "types.h" + #ifdef RT_USING_DFS #define STDIN_FILENO 0 /* standard input file descriptor */ @@ -40,4 +44,7 @@ int isatty (int fd); char * ttyname (int desc); +unsigned int sleep(unsigned int seconds); +int usleep(useconds_t usec); + #endif /* _SYS_UNISTD_H */ |
