From 44de143a08d9026b77591704a58f320413fdcfa6 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:04:59 +0800 Subject: [PATCH 01/22] the interfaces for pse51. --- components/libc/posix/pthreads/pthread.c | 65 +++++++++++++++++++ components/libc/posix/pthreads/pthread.h | 18 ++++- components/libc/posix/pthreads/pthread_attr.c | 22 ++++++- .../libc/posix/pthreads/pthread_mutex.c | 42 ++++++++++++ components/libc/posix/pthreads/sched.c | 15 +++++ components/libc/posix/pthreads/sched.h | 1 + 6 files changed, 161 insertions(+), 2 deletions(-) diff --git a/components/libc/posix/pthreads/pthread.c b/components/libc/posix/pthreads/pthread.c index b0bf39dff6b..5ee6f2c7370 100644 --- a/components/libc/posix/pthreads/pthread.c +++ b/components/libc/posix/pthreads/pthread.c @@ -18,6 +18,7 @@ RT_DEFINE_SPINLOCK(pth_lock); _pthread_data_t *pth_table[PTHREAD_NUM_MAX] = {NULL}; +static int concurrency_level; _pthread_data_t *_pthread_get_data(pthread_t thread) { @@ -451,6 +452,70 @@ pthread_t pthread_self (void) } RTM_EXPORT(pthread_self); +int pthread_getcpuclockid(pthread_t thread, clockid_t *clock_id) +{ + if(_pthread_get_data(thread) == NULL) + { + return EINVAL; + } + + *clock_id = (clockid_t)rt_tick_get(); + + return 0; +} +RTM_EXPORT(pthread_getcpuclockid); + +int pthread_getconcurrency(void) +{ + return concurrency_level; +} +RTM_EXPORT(pthread_getconcurrency); + +int pthread_setconcurrency(int new_level) +{ + concurrency_level = new_level; + + return 0; +} +RTM_EXPORT(pthread_setconcurrency); + +int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param) +{ + _pthread_data_t *ptd; + + ptd = _pthread_get_data(thread); + pthread_attr_getschedpolicy(&ptd->attr, policy); + pthread_attr_getschedparam(&ptd->attr, param); + + return 0; +} +RTM_EXPORT(pthread_getschedparam); + +int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param) +{ + _pthread_data_t *ptd; + + ptd = _pthread_get_data(thread); + pthread_attr_setschedpolicy(&ptd->attr, policy); + pthread_attr_setschedparam(&ptd->attr, param); + + return 0; +} +RTM_EXPORT(pthread_setschedparam); + +int pthread_setschedprio(pthread_t thread, int prio) +{ + _pthread_data_t *ptd; + struct sched_param param; + + ptd = _pthread_get_data(thread); + param.sched_priority = prio; + pthread_attr_setschedparam(&ptd->attr, ¶m); + + return 0; +} +RTM_EXPORT(pthread_setschedprio); + void pthread_exit(void *value) { _pthread_data_t *ptd; diff --git a/components/libc/posix/pthreads/pthread.h b/components/libc/posix/pthreads/pthread.h index 177b2539c51..7fdcfd70778 100644 --- a/components/libc/posix/pthreads/pthread.h +++ b/components/libc/posix/pthreads/pthread.h @@ -158,8 +158,10 @@ int pthread_attr_getstack(pthread_attr_t const *attr, size_t *stack_size); int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guard_size); int pthread_attr_getguardsize(pthread_attr_t const *attr, size_t *guard_size); +int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched); +int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inheritsched); int pthread_attr_setscope(pthread_attr_t *attr, int scope); -int pthread_attr_getscope(pthread_attr_t const *attr); +int pthread_attr_getscope(pthread_attr_t const *attr, int *scope); int pthread_system_init(void); int pthread_create (pthread_t *tid, const pthread_attr_t *attr, void *(*start) (void *), void *arg); @@ -174,6 +176,13 @@ rt_inline int pthread_equal (pthread_t t1, pthread_t t2) pthread_t pthread_self (void); +int pthread_getcpuclockid(pthread_t thread, clockid_t *clock_id); +int pthread_getconcurrency(void); +int pthread_setconcurrency(int new_level); +int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param); +int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param); +int pthread_setschedprio(pthread_t thread, int prio); + void pthread_exit (void *value_ptr); int pthread_once(pthread_once_t * once_control, void (*init_routine) (void)); @@ -196,6 +205,8 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex); int pthread_mutex_lock(pthread_mutex_t *mutex); int pthread_mutex_unlock(pthread_mutex_t *mutex); int pthread_mutex_trylock(pthread_mutex_t *mutex); +int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, int *prioceiling); +int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *old_ceiling); int pthread_mutexattr_init(pthread_mutexattr_t *attr); int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); @@ -203,6 +214,11 @@ int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type); int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared); int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr, int *pshared); +int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *prioceiling); +int pthread_mutexattr_setprioceiling(const pthread_mutexattr_t *attr, int prioceiling); +int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *protocol); +int pthread_mutexattr_setprotocol(const pthread_mutexattr_t *attr, int protocol); + /* pthread condition interface */ int pthread_condattr_destroy(pthread_condattr_t *attr); diff --git a/components/libc/posix/pthreads/pthread_attr.c b/components/libc/posix/pthreads/pthread_attr.c index 4aedf5a90d4..047e06e21d1 100644 --- a/components/libc/posix/pthreads/pthread_attr.c +++ b/components/libc/posix/pthreads/pthread_attr.c @@ -189,6 +189,26 @@ int pthread_attr_getguardsize(pthread_attr_t const *attr, size_t *guard_size) } RTM_EXPORT(pthread_attr_getguardsize); +int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched) +{ + RT_ASSERT(attr != RT_NULL); + + attr->inheritsched = inheritsched; + + return 0; +} +RTM_EXPORT(pthread_attr_setinheritsched); + +int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inheritsched) +{ + RT_ASSERT(attr != RT_NULL); + + *inheritsched = attr->inheritsched; + + return 0; +} +RTM_EXPORT(pthread_attr_getinheritsched); + int pthread_attr_setscope(pthread_attr_t *attr, int scope) { if (scope == PTHREAD_SCOPE_SYSTEM) @@ -200,7 +220,7 @@ int pthread_attr_setscope(pthread_attr_t *attr, int scope) } RTM_EXPORT(pthread_attr_setscope); -int pthread_attr_getscope(pthread_attr_t const *attr) +int pthread_attr_getscope(pthread_attr_t const *attr, int *scope) { return PTHREAD_SCOPE_SYSTEM; } diff --git a/components/libc/posix/pthreads/pthread_mutex.c b/components/libc/posix/pthreads/pthread_mutex.c index 7bc5ff95c7b..1010c06959b 100644 --- a/components/libc/posix/pthreads/pthread_mutex.c +++ b/components/libc/posix/pthreads/pthread_mutex.c @@ -246,3 +246,45 @@ int pthread_mutex_trylock(pthread_mutex_t *mutex) return EBUSY; } RTM_EXPORT(pthread_mutex_trylock); + +int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *prioceiling) +{ + return EINVAL; +} +RTM_EXPORT(pthread_mutexattr_getprioceiling); + +int pthread_mutexattr_setprioceiling(const pthread_mutexattr_t *attr, int prioceiling) +{ + return EINVAL; +} +RTM_EXPORT(pthread_mutexattr_setprioceiling); + +int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, int *protocol) +{ + return EINVAL; +} +RTM_EXPORT(pthread_mutexattr_getprotocol); + +int pthread_mutexattr_setprotocol(const pthread_mutexattr_t *attr, int protocol) +{ + return EINVAL; +} +RTM_EXPORT(pthread_mutexattr_setprotocol); + +int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, int *prioceiling) +{ + return pthread_mutexattr_getprioceiling(&mutex->attr, prioceiling); +} +RTM_EXPORT(pthread_mutex_getprioceiling); + +int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, int prioceiling, int *old_ceiling) +{ + *old_ceiling = pthread_mutexattr_getprioceiling(&mutex->attr, old_ceiling); + if(*old_ceiling != 0) + { + return EINVAL; + } + + return pthread_mutexattr_setprioceiling(&mutex->attr, prioceiling); +} +RTM_EXPORT(pthread_mutex_setprioceiling); diff --git a/components/libc/posix/pthreads/sched.c b/components/libc/posix/pthreads/sched.c index 5f2a53c01f3..e472e8e763e 100644 --- a/components/libc/posix/pthreads/sched.c +++ b/components/libc/posix/pthreads/sched.c @@ -40,3 +40,18 @@ int sched_setscheduler(pid_t pid, int policy) return EOPNOTSUPP; } RTM_EXPORT(sched_setscheduler); + +int sched_rr_get_interval(pid_t pid, struct timespec *tp) +{ + if(pid != NULL) + { + return EINVAL; + } + + rt_set_errno(-EINVAL); + + /* course model, don't support */ + // TODO + return -1; +} +RTM_EXPORT(sched_rr_get_interval); diff --git a/components/libc/posix/pthreads/sched.h b/components/libc/posix/pthreads/sched.h index 07e2c0c6a82..a343eaddad1 100644 --- a/components/libc/posix/pthreads/sched.h +++ b/components/libc/posix/pthreads/sched.h @@ -31,6 +31,7 @@ extern "C" int sched_yield(void); int sched_get_priority_min(int policy); int sched_get_priority_max(int policy); +int sched_rr_get_interval(pid_t pid, struct timespec *tp); int sched_setscheduler(pid_t pid, int policy); #ifdef __cplusplus From d62ed7ccc87f986aab58f6b7733187752597d7a4 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:05:37 +0800 Subject: [PATCH 02/22] "utsname" file. --- .../libc/compilers/common/sys/utsname.h | 41 +++++++++++++++++++ components/libc/compilers/common/utsname.c | 21 ++++++++++ 2 files changed, 62 insertions(+) create mode 100644 components/libc/compilers/common/sys/utsname.h create mode 100644 components/libc/compilers/common/utsname.c diff --git a/components/libc/compilers/common/sys/utsname.h b/components/libc/compilers/common/sys/utsname.h new file mode 100644 index 00000000000..c51c325528e --- /dev/null +++ b/components/libc/compilers/common/sys/utsname.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-12-11 xiangxistu The first version + */ + +#ifndef __SYS_UTSNAME_H__ +#define __SYS_UTSNAME_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +struct utsname +{ + char sysname[RT_NAME_MAX]; /* Operating system name (e.g., "Linux", "RT-Thread") */ + char nodename[RT_NAME_MAX]; /* Name within "some implementation-defined network" */ + char release[RT_NAME_MAX]; /* Operating system release (e.g., "2.6.28") */ + char version[RT_NAME_MAX]; /* Operating system version */ + char machine[RT_NAME_MAX]; /* Hardware identifier */ +#ifdef _GNU_SOURCE + char domainname[RT_NAME_MAX]; /* NIS or YP domain name */ +#endif +}; + + + +int uname(struct utsname *buf); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/components/libc/compilers/common/utsname.c b/components/libc/compilers/common/utsname.c new file mode 100644 index 00000000000..71ee9e4bf7d --- /dev/null +++ b/components/libc/compilers/common/utsname.c @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-12-11 xiangxistu first version + */ + +#include + +static struct utsname default_utsname; + +int uname(struct utsname *buf) +{ + rt_memcpy(&default_utsname, buf, sizeof(struct utsname)); + + return 0; +} + From cfc9a812503470440d3b99b75d7228ddd692d8bb Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:07:09 +0800 Subject: [PATCH 03/22] "confstr" interface. --- .../libc/compilers/common/nogcc/sys/unistd.h | 1 + .../libc/compilers/gcc/newlib/machine/unistd.h | 7 +++++++ components/libc/posix/src/unistd.c | 14 ++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 components/libc/compilers/gcc/newlib/machine/unistd.h diff --git a/components/libc/compilers/common/nogcc/sys/unistd.h b/components/libc/compilers/common/nogcc/sys/unistd.h index 6195c4c2aa2..b5ee85bf3a0 100644 --- a/components/libc/compilers/common/nogcc/sys/unistd.h +++ b/components/libc/compilers/common/nogcc/sys/unistd.h @@ -32,6 +32,7 @@ int access(const char *path, int amode); int pipe(int fildes[2]); int isatty(int fd); char *ttyname(int desc); +size_t confstr(int name, char *buf, size_t len); unsigned int sleep(unsigned int seconds); int usleep(useconds_t usec); pid_t gettid(void); diff --git a/components/libc/compilers/gcc/newlib/machine/unistd.h b/components/libc/compilers/gcc/newlib/machine/unistd.h new file mode 100644 index 00000000000..6957c341847 --- /dev/null +++ b/components/libc/compilers/gcc/newlib/machine/unistd.h @@ -0,0 +1,7 @@ +#ifndef _MACHTIME_H_ +#define _MACHTIME_H_ + +#include +size_t confstr(int name, char *buf, size_t len); + +#endif /* _MACHTIME_H_ */ \ No newline at end of file diff --git a/components/libc/posix/src/unistd.c b/components/libc/posix/src/unistd.c index cb18dd3499d..0e98a3fee90 100644 --- a/components/libc/posix/src/unistd.c +++ b/components/libc/posix/src/unistd.c @@ -39,3 +39,17 @@ char *ttyname(int fd) return "/dev/tty"; /* TODO: need to add more specific */ } RTM_EXPORT(ttyname); + +size_t confstr(int name, char *buf, size_t len) +{ + int length = 0; + length = rt_strlen(name); + + if(buf != RT_NULL) + { + length = rt_strncpy(buf, name, len); + } + + return length; +} +RTM_EXPORT(confstr); From 883630687337c2603b69b5b5cb9d2a9839a11ebb Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:08:01 +0800 Subject: [PATCH 04/22] "nanosleep" interface. --- components/libc/compilers/common/time.c | 38 +++++++++++++++++++ .../libc/compilers/gcc/newlib/machine/time.h | 2 - 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index 73b6d763528..81fd50646da 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -612,6 +612,17 @@ int clock_gettime(clockid_t clockid, struct timespec *tp) } RTM_EXPORT(clock_gettime); +int clock_nanosleep(clockid_t clockid, int flags, const struct timespec *rqtp, struct timespec *rmtp) +{ + if ((clockid != CLOCK_REALTIME) || (rqtp == RT_NULL)) + { + rt_set_errno(EINVAL); + return -1; + } + + return nanosleep(rqtp, rmtp); +} + int clock_settime(clockid_t clockid, const struct timespec *tp) { #ifndef RT_USING_RTC @@ -655,6 +666,33 @@ int clock_settime(clockid_t clockid, const struct timespec *tp) } RTM_EXPORT(clock_settime); +int nanosleep(const struct timespec *rqtp, struct timespec *rmtp) +{ + uint32_t time_ms = rqtp->tv_sec * 1000; + uint32_t time_us = rqtp->tv_nsec / 1000; + + time_ms += time_us / 1000 ; + time_us = time_us % 1000; + + if (rt_thread_self() != RT_NULL) + { + rt_thread_mdelay(time_ms); + } + else /* scheduler has not run yet */ + { + while(time_ms > 0) + { + rt_hw_us_delay(1000u); + time_ms -= 1; + } + } + + rt_hw_us_delay(time_us); + + return 0; +} +RTM_EXPORT(nanosleep); + int rt_timespec_to_tick(const struct timespec *time) { int tick; diff --git a/components/libc/compilers/gcc/newlib/machine/time.h b/components/libc/compilers/gcc/newlib/machine/time.h index ff754d24730..b7447532f02 100644 --- a/components/libc/compilers/gcc/newlib/machine/time.h +++ b/components/libc/compilers/gcc/newlib/machine/time.h @@ -4,9 +4,7 @@ #include #define _CLOCKS_PER_SEC_ RT_TICK_PER_SECOND -#ifdef __SPU__ #include int nanosleep (const struct timespec *, struct timespec *); -#endif #endif /* _MACHTIME_H_ */ From 1ffd195216e446b9e181f330c35e029c22ebe367 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:10:25 +0800 Subject: [PATCH 05/22] /pthread/mqeue.c -> ipc/mqeue.c --- components/libc/posix/{pthreads => ipc}/mqueue.c | 0 components/libc/posix/{pthreads => ipc}/mqueue.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename components/libc/posix/{pthreads => ipc}/mqueue.c (100%) rename components/libc/posix/{pthreads => ipc}/mqueue.h (100%) diff --git a/components/libc/posix/pthreads/mqueue.c b/components/libc/posix/ipc/mqueue.c similarity index 100% rename from components/libc/posix/pthreads/mqueue.c rename to components/libc/posix/ipc/mqueue.c diff --git a/components/libc/posix/pthreads/mqueue.h b/components/libc/posix/ipc/mqueue.h similarity index 100% rename from components/libc/posix/pthreads/mqueue.h rename to components/libc/posix/ipc/mqueue.h From df62b2ace6187b541ee4306aafa59cdc780ff3af Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:11:17 +0800 Subject: [PATCH 06/22] /pthread/semaphore.c -> ipc/semaphore.c --- components/libc/posix/{pthreads => ipc}/semaphore.c | 0 components/libc/posix/{pthreads => ipc}/semaphore.h | 1 + 2 files changed, 1 insertion(+) rename components/libc/posix/{pthreads => ipc}/semaphore.c (100%) rename components/libc/posix/{pthreads => ipc}/semaphore.h (99%) diff --git a/components/libc/posix/pthreads/semaphore.c b/components/libc/posix/ipc/semaphore.c similarity index 100% rename from components/libc/posix/pthreads/semaphore.c rename to components/libc/posix/ipc/semaphore.c diff --git a/components/libc/posix/pthreads/semaphore.h b/components/libc/posix/ipc/semaphore.h similarity index 99% rename from components/libc/posix/pthreads/semaphore.h rename to components/libc/posix/ipc/semaphore.h index 872226e3850..27b1e1cfe26 100644 --- a/components/libc/posix/pthreads/semaphore.h +++ b/components/libc/posix/ipc/semaphore.h @@ -40,4 +40,5 @@ int sem_trywait(sem_t *sem); int sem_unlink(const char *name); int sem_wait(sem_t *sem); + #endif From 81474935e7e8ea1966ca57b3eb82b11fffabdf8c Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:13:01 +0800 Subject: [PATCH 07/22] the script for sem, mqueue. --- components/libc/posix/ipc/SConscript | 12 ++++++++++++ components/libc/posix/ipc/sys/msg.h | 2 +- components/libc/posix/ipc/sys/sem.h | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 components/libc/posix/ipc/SConscript diff --git a/components/libc/posix/ipc/SConscript b/components/libc/posix/ipc/SConscript new file mode 100644 index 00000000000..c53afb46287 --- /dev/null +++ b/components/libc/posix/ipc/SConscript @@ -0,0 +1,12 @@ +from building import * +from utils import VersionCmp + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] +CPPDEFINES = [] + +group = DefineGroup('POSIX', src, + depend = ['RT_USING_LIBC'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) + +Return('group') diff --git a/components/libc/posix/ipc/sys/msg.h b/components/libc/posix/ipc/sys/msg.h index c030c9e8cbc..678f9138b36 100644 --- a/components/libc/posix/ipc/sys/msg.h +++ b/components/libc/posix/ipc/sys/msg.h @@ -10,6 +10,6 @@ #ifndef __SYS_MSG_H__ #define __SYS_MSG_H__ - +#include "mqueue.h" #endif diff --git a/components/libc/posix/ipc/sys/sem.h b/components/libc/posix/ipc/sys/sem.h index b849bd687da..ea7cd459297 100644 --- a/components/libc/posix/ipc/sys/sem.h +++ b/components/libc/posix/ipc/sys/sem.h @@ -10,6 +10,6 @@ #ifndef __SYS_SEM_H__ #define __SYS_SEM_H__ - +#include "semaphore.h" #endif From 303de0a0706fdedf0f8cece7bffc5084a9dd8de2 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Mon, 13 Dec 2021 18:14:11 +0800 Subject: [PATCH 08/22] the note for posix. --- components/libc/posix/readme.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/libc/posix/readme.md b/components/libc/posix/readme.md index 787b9ddefa4..67425767e8a 100644 --- a/components/libc/posix/readme.md +++ b/components/libc/posix/readme.md @@ -1 +1,10 @@ -This folder provides functions that are not part of the standard C library but are part of the POSIX.1 (IEEE Standard 1003.1) standard. \ No newline at end of file +This folder provides functions that are not part of the standard C library but are part of the POSIX.1 (IEEE Standard 1003.1) standard. + + + +## NOTE + +1. when you use libc interface with gcc platform, you should define ```_POSIX_C_SOURCE```. You can set it ```#define _POSIX_C_SOURCE 200809L``` at the top of this file before you quote some header files. +2. For consistency of compilation results across the different of platforms(gcc, keil, iar) , you better use ``#include `` to instead of ``#include ``. +3. According the different of platform, we realize many interfaces for them. But the number of interfaces that we reailzed for those platform is different. + From 22bcd3ecfee7c422f7a44e69bb53e2912ee1c82d Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:47:58 +0800 Subject: [PATCH 09/22] [move] create 'system V ipc', move origin files to '/system'. --- components/libc/posix/ipc/{ => system-v}/sys/ipc.h | 0 components/libc/posix/ipc/{ => system-v}/sys/msg.h | 2 +- components/libc/posix/ipc/{ => system-v}/sys/sem.h | 2 -- components/libc/posix/ipc/{ => system-v}/sys/shm.h | 0 4 files changed, 1 insertion(+), 3 deletions(-) rename components/libc/posix/ipc/{ => system-v}/sys/ipc.h (100%) rename components/libc/posix/ipc/{ => system-v}/sys/msg.h (92%) rename components/libc/posix/ipc/{ => system-v}/sys/sem.h (91%) rename components/libc/posix/ipc/{ => system-v}/sys/shm.h (100%) diff --git a/components/libc/posix/ipc/sys/ipc.h b/components/libc/posix/ipc/system-v/sys/ipc.h similarity index 100% rename from components/libc/posix/ipc/sys/ipc.h rename to components/libc/posix/ipc/system-v/sys/ipc.h diff --git a/components/libc/posix/ipc/sys/msg.h b/components/libc/posix/ipc/system-v/sys/msg.h similarity index 92% rename from components/libc/posix/ipc/sys/msg.h rename to components/libc/posix/ipc/system-v/sys/msg.h index 678f9138b36..c030c9e8cbc 100644 --- a/components/libc/posix/ipc/sys/msg.h +++ b/components/libc/posix/ipc/system-v/sys/msg.h @@ -10,6 +10,6 @@ #ifndef __SYS_MSG_H__ #define __SYS_MSG_H__ -#include "mqueue.h" + #endif diff --git a/components/libc/posix/ipc/sys/sem.h b/components/libc/posix/ipc/system-v/sys/sem.h similarity index 91% rename from components/libc/posix/ipc/sys/sem.h rename to components/libc/posix/ipc/system-v/sys/sem.h index ea7cd459297..fdb70496d8d 100644 --- a/components/libc/posix/ipc/sys/sem.h +++ b/components/libc/posix/ipc/system-v/sys/sem.h @@ -10,6 +10,4 @@ #ifndef __SYS_SEM_H__ #define __SYS_SEM_H__ -#include "semaphore.h" - #endif diff --git a/components/libc/posix/ipc/sys/shm.h b/components/libc/posix/ipc/system-v/sys/shm.h similarity index 100% rename from components/libc/posix/ipc/sys/shm.h rename to components/libc/posix/ipc/system-v/sys/shm.h From e1a3388dc9e03c1955c88f2943d94dc3424e7d74 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:50:02 +0800 Subject: [PATCH 10/22] [remove] 'confstr' will be submitted in the subsequent PR. --- .../libc/compilers/common/nogcc/sys/unistd.h | 1 - .../libc/compilers/gcc/newlib/machine/unistd.h | 7 ------- components/libc/posix/src/unistd.c | 14 -------------- 3 files changed, 22 deletions(-) delete mode 100644 components/libc/compilers/gcc/newlib/machine/unistd.h diff --git a/components/libc/compilers/common/nogcc/sys/unistd.h b/components/libc/compilers/common/nogcc/sys/unistd.h index b5ee85bf3a0..6195c4c2aa2 100644 --- a/components/libc/compilers/common/nogcc/sys/unistd.h +++ b/components/libc/compilers/common/nogcc/sys/unistd.h @@ -32,7 +32,6 @@ int access(const char *path, int amode); int pipe(int fildes[2]); int isatty(int fd); char *ttyname(int desc); -size_t confstr(int name, char *buf, size_t len); unsigned int sleep(unsigned int seconds); int usleep(useconds_t usec); pid_t gettid(void); diff --git a/components/libc/compilers/gcc/newlib/machine/unistd.h b/components/libc/compilers/gcc/newlib/machine/unistd.h deleted file mode 100644 index 6957c341847..00000000000 --- a/components/libc/compilers/gcc/newlib/machine/unistd.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _MACHTIME_H_ -#define _MACHTIME_H_ - -#include -size_t confstr(int name, char *buf, size_t len); - -#endif /* _MACHTIME_H_ */ \ No newline at end of file diff --git a/components/libc/posix/src/unistd.c b/components/libc/posix/src/unistd.c index 0e98a3fee90..cb18dd3499d 100644 --- a/components/libc/posix/src/unistd.c +++ b/components/libc/posix/src/unistd.c @@ -39,17 +39,3 @@ char *ttyname(int fd) return "/dev/tty"; /* TODO: need to add more specific */ } RTM_EXPORT(ttyname); - -size_t confstr(int name, char *buf, size_t len) -{ - int length = 0; - length = rt_strlen(name); - - if(buf != RT_NULL) - { - length = rt_strncpy(buf, name, len); - } - - return length; -} -RTM_EXPORT(confstr); From 860707bcff10b0d1991727e18489ce6c1840fe0c Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:50:33 +0800 Subject: [PATCH 11/22] [remove] 'uname' will be submitted in the subsequent PR. --- .../libc/compilers/common/sys/utsname.h | 41 ------------------- components/libc/compilers/common/utsname.c | 21 ---------- 2 files changed, 62 deletions(-) delete mode 100644 components/libc/compilers/common/sys/utsname.h delete mode 100644 components/libc/compilers/common/utsname.c diff --git a/components/libc/compilers/common/sys/utsname.h b/components/libc/compilers/common/sys/utsname.h deleted file mode 100644 index c51c325528e..00000000000 --- a/components/libc/compilers/common/sys/utsname.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2006-2021, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2021-12-11 xiangxistu The first version - */ - -#ifndef __SYS_UTSNAME_H__ -#define __SYS_UTSNAME_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -struct utsname -{ - char sysname[RT_NAME_MAX]; /* Operating system name (e.g., "Linux", "RT-Thread") */ - char nodename[RT_NAME_MAX]; /* Name within "some implementation-defined network" */ - char release[RT_NAME_MAX]; /* Operating system release (e.g., "2.6.28") */ - char version[RT_NAME_MAX]; /* Operating system version */ - char machine[RT_NAME_MAX]; /* Hardware identifier */ -#ifdef _GNU_SOURCE - char domainname[RT_NAME_MAX]; /* NIS or YP domain name */ -#endif -}; - - - -int uname(struct utsname *buf); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/components/libc/compilers/common/utsname.c b/components/libc/compilers/common/utsname.c deleted file mode 100644 index 71ee9e4bf7d..00000000000 --- a/components/libc/compilers/common/utsname.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2006-2021, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2021-12-11 xiangxistu first version - */ - -#include - -static struct utsname default_utsname; - -int uname(struct utsname *buf) -{ - rt_memcpy(&default_utsname, buf, sizeof(struct utsname)); - - return 0; -} - From bbfd9efcd8a104822511d1af41a9fea39d11b709 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:53:33 +0800 Subject: [PATCH 12/22] [fix] don't need 'pthread_private.h'. --- components/libc/posix/ipc/mqueue.c | 1 - components/libc/posix/ipc/semaphore.c | 1 - 2 files changed, 2 deletions(-) diff --git a/components/libc/posix/ipc/mqueue.c b/components/libc/posix/ipc/mqueue.c index 6840164a68c..5ca23a5cd59 100644 --- a/components/libc/posix/ipc/mqueue.c +++ b/components/libc/posix/ipc/mqueue.c @@ -10,7 +10,6 @@ #include #include #include "mqueue.h" -#include "pthread_internal.h" static mqd_t posix_mq_list = RT_NULL; static struct rt_semaphore posix_mq_lock; diff --git a/components/libc/posix/ipc/semaphore.c b/components/libc/posix/ipc/semaphore.c index 5e59ae850fc..9d2445a0b50 100644 --- a/components/libc/posix/ipc/semaphore.c +++ b/components/libc/posix/ipc/semaphore.c @@ -11,7 +11,6 @@ #include #include #include "semaphore.h" -#include "pthread_internal.h" static sem_t *posix_sem_list = RT_NULL; static struct rt_semaphore posix_sem_lock; From 10d85e5d1428206477b88d4477f2a2382fd614f6 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:55:32 +0800 Subject: [PATCH 13/22] [modify] don't need define '_POSIX_C_SOURCE', because it is useless. --- components/libc/posix/pthreads/SConscript | 12 +----------- components/libc/posix/readme.md | 4 +--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/components/libc/posix/pthreads/SConscript b/components/libc/posix/pthreads/SConscript index 7cd78300b2a..f6105db1810 100644 --- a/components/libc/posix/pthreads/SConscript +++ b/components/libc/posix/pthreads/SConscript @@ -6,17 +6,7 @@ src = Glob('*.c') CPPPATH = [cwd] CPPDEFINES = [] -# only enable POSIX.1b-1993 Real-time extensions -libc_ver = GetDepend('LIBC_VERSION') -try: - ver = libc_ver.split(' ') - ver = ver[1] - if VersionCmp(ver, "2.5.0") == 1: - CPPDEFINES = ['_POSIX_C_SOURCE=199309L'] -except : - pass - -group = DefineGroup('POSIX', src, +group = DefineGroup('POSIX', src, depend = ['RT_USING_PTHREADS', 'RT_USING_LIBC'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/components/libc/posix/readme.md b/components/libc/posix/readme.md index 67425767e8a..df01047d6b3 100644 --- a/components/libc/posix/readme.md +++ b/components/libc/posix/readme.md @@ -4,7 +4,5 @@ This folder provides functions that are not part of the standard C library but a ## NOTE -1. when you use libc interface with gcc platform, you should define ```_POSIX_C_SOURCE```. You can set it ```#define _POSIX_C_SOURCE 200809L``` at the top of this file before you quote some header files. -2. For consistency of compilation results across the different of platforms(gcc, keil, iar) , you better use ``#include `` to instead of ``#include ``. -3. According the different of platform, we realize many interfaces for them. But the number of interfaces that we reailzed for those platform is different. +1. For consistency of compilation results across the different of platforms(gcc, keil, iar) , you better use ``#include `` to instead of ``#include ``. From 30ecb4194191f75652ba11575dc0ce0bbc4e62d0 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:56:26 +0800 Subject: [PATCH 14/22] [add] add new macro for POSIX IPC and SYSTEM V IPC. --- components/libc/posix/ipc/Kconfig | 17 +++++++++++++++++ components/libc/posix/ipc/SConscript | 18 +++++++++++++----- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/components/libc/posix/ipc/Kconfig b/components/libc/posix/ipc/Kconfig index f5ec6ad0403..75ef3f3264b 100644 --- a/components/libc/posix/ipc/Kconfig +++ b/components/libc/posix/ipc/Kconfig @@ -12,6 +12,23 @@ config RT_USING_POSIX_PIPE_SIZE depends on RT_USING_POSIX_PIPE default 512 +# We have't implement of 'systemv ipc', so hide it firstly. +# +# config RT_USING_POSIX_IPC_SYSTEM_V +# bool "Enable System V IPC" +# default n +# help +# System V supplies an alternative form of interprocess communication consisting of thress +# features: shared memory, message, and semaphores. + +config RT_USING_POSIX_MESSAGE_QUEUE + bool "Enable posix message queue " + default n + +config RT_USING_POSIX_MESSAGE_SEMAPHORE + bool "Enable posix semaphore " + default n + comment "Socket is in the 'Network' category" endmenu diff --git a/components/libc/posix/ipc/SConscript b/components/libc/posix/ipc/SConscript index c53afb46287..08f93765fc0 100644 --- a/components/libc/posix/ipc/SConscript +++ b/components/libc/posix/ipc/SConscript @@ -1,12 +1,20 @@ from building import * -from utils import VersionCmp cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd] +src = [] +inc = [cwd] CPPDEFINES = [] -group = DefineGroup('POSIX', src, - depend = ['RT_USING_LIBC'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) +# if GetDepend('RT_USING_POSIX_IPC_SYSTEM_V'): +# src += Glob('system-v/*.c') +# inc += [cwd + '/system-v'] + +if GetDepend('RT_USING_POSIX_MESSAGE_QUEUE'): + src += ['mqueue.c'] + +if GetDepend('RT_USING_POSIX_MESSAGE_SEMAPHORE'): + src += ['semaphore.c'] + +group = DefineGroup('POSIX', src, depend = [], CPPPATH = inc, CPPDEFINES = CPPDEFINES) Return('group') From 2ad665e341166d597f3725fdbf3a0449b64d1de5 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 15:57:45 +0800 Subject: [PATCH 15/22] [fix] complier's warning. --- components/libc/posix/pthreads/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/libc/posix/pthreads/sched.c b/components/libc/posix/pthreads/sched.c index e472e8e763e..833d70e8f09 100644 --- a/components/libc/posix/pthreads/sched.c +++ b/components/libc/posix/pthreads/sched.c @@ -43,7 +43,7 @@ RTM_EXPORT(sched_setscheduler); int sched_rr_get_interval(pid_t pid, struct timespec *tp) { - if(pid != NULL) + if(pid != 0) { return EINVAL; } From 8ab249c57413b19ff5c4967c27ee42a8cc305ced Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 16:09:44 +0800 Subject: [PATCH 16/22] [fix] code format. --- components/libc/posix/ipc/SConscript | 3 +-- components/libc/posix/ipc/semaphore.h | 1 - components/libc/posix/pthreads/SConscript | 4 +--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/components/libc/posix/ipc/SConscript b/components/libc/posix/ipc/SConscript index 08f93765fc0..5e1453ac13e 100644 --- a/components/libc/posix/ipc/SConscript +++ b/components/libc/posix/ipc/SConscript @@ -3,7 +3,6 @@ from building import * cwd = GetCurrentDir() src = [] inc = [cwd] -CPPDEFINES = [] # if GetDepend('RT_USING_POSIX_IPC_SYSTEM_V'): # src += Glob('system-v/*.c') @@ -15,6 +14,6 @@ if GetDepend('RT_USING_POSIX_MESSAGE_QUEUE'): if GetDepend('RT_USING_POSIX_MESSAGE_SEMAPHORE'): src += ['semaphore.c'] -group = DefineGroup('POSIX', src, depend = [], CPPPATH = inc, CPPDEFINES = CPPDEFINES) +group = DefineGroup('POSIX', src, depend = [], CPPPATH = inc) Return('group') diff --git a/components/libc/posix/ipc/semaphore.h b/components/libc/posix/ipc/semaphore.h index 27b1e1cfe26..872226e3850 100644 --- a/components/libc/posix/ipc/semaphore.h +++ b/components/libc/posix/ipc/semaphore.h @@ -40,5 +40,4 @@ int sem_trywait(sem_t *sem); int sem_unlink(const char *name); int sem_wait(sem_t *sem); - #endif diff --git a/components/libc/posix/pthreads/SConscript b/components/libc/posix/pthreads/SConscript index f6105db1810..a95f9076211 100644 --- a/components/libc/posix/pthreads/SConscript +++ b/components/libc/posix/pthreads/SConscript @@ -4,9 +4,7 @@ from utils import VersionCmp cwd = GetCurrentDir() src = Glob('*.c') CPPPATH = [cwd] -CPPDEFINES = [] -group = DefineGroup('POSIX', src, - depend = ['RT_USING_PTHREADS', 'RT_USING_LIBC'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) +group = DefineGroup('POSIX', src, depend = ['RT_USING_PTHREADS'], CPPPATH = CPPPATH) Return('group') From 97caaa5771748eaf0608804e68c2911f157ce101 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 18:02:52 +0800 Subject: [PATCH 17/22] [add] the file that mips haven't. --- .../compilers/common/nogcc/sys/_timespec.h | 27 +++++++++++++++++++ .../compilers/gcc/partial/mips/SConscript | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 components/libc/compilers/common/nogcc/sys/_timespec.h diff --git a/components/libc/compilers/common/nogcc/sys/_timespec.h b/components/libc/compilers/common/nogcc/sys/_timespec.h new file mode 100644 index 00000000000..804ce18d7dc --- /dev/null +++ b/components/libc/compilers/common/nogcc/sys/_timespec.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-07-21 xiangxistu The first version + */ + +#ifndef _SYS__TIMESPEC_H_ +#define _SYS__TIMESPEC_H_ + +#include + +#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED) +typedef _TIME_T_ time_t; +#define __time_t_defined +#define _TIME_T_DECLARED +#endif + +struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +}; + +#endif /* !_SYS__TIMESPEC_H_ */ diff --git a/components/libc/compilers/gcc/partial/mips/SConscript b/components/libc/compilers/gcc/partial/mips/SConscript index 7651233d461..fbd7a260cd4 100644 --- a/components/libc/compilers/gcc/partial/mips/SConscript +++ b/components/libc/compilers/gcc/partial/mips/SConscript @@ -11,7 +11,9 @@ group = [] if rtconfig.PLATFORM == 'gcc' and ('mips' in rtconfig.PREFIX): # identify mips gcc tool chain try: # There is no 'sys/select.h' in tthe mips gcc toolchain; it will be copied from 'nogcc/sys/select.h' + # There is no 'sys/_timespec.h' in tthe mips gcc toolchain; it will be copied from 'nogcc/sys/_timespec.h' copy("../../../common/nogcc/sys/select.h", "./sys/select.h") + copy("../../../common/nogcc/sys/_timespec.h", "./sys/_timespec.h") except: pass From ac9dd34fb00809f379f21f7242a01369767a07c1 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 18:05:57 +0800 Subject: [PATCH 18/22] [update] refresh '.config' and 'rtconfig.h' files. --- bsp/lpc408x/.config | 157 +++++++++++----------- bsp/lpc408x/rtconfig.h | 67 +++------- bsp/qemu-vexpress-a9/.config | 173 ++++++++++++++----------- bsp/qemu-vexpress-a9/drivers/automac.h | 6 +- bsp/qemu-vexpress-a9/rtconfig.h | 77 ++++------- bsp/qemu-vexpress-gemini/.config | 152 ++++++++++++---------- bsp/qemu-vexpress-gemini/rtconfig.h | 64 +++------ bsp/raspberry-pi/raspi4-32/.config | 92 +++++++++++-- bsp/raspberry-pi/raspi4-32/rtconfig.h | 16 ++- 9 files changed, 429 insertions(+), 375 deletions(-) diff --git a/bsp/lpc408x/.config b/bsp/lpc408x/.config index 3409be46945..0a532f7ac1d 100644 --- a/bsp/lpc408x/.config +++ b/bsp/lpc408x/.config @@ -1,9 +1,13 @@ -# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Project Configuration +# # # RT-Thread Kernel # CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_BIG_ENDIAN is not set # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=4 @@ -24,10 +28,10 @@ CONFIG_IDLE_THREAD_STACK_SIZE=256 # # CONFIG_RT_KSERVICE_USING_STDLIB is not set # CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set +# CONFIG_RT_USING_ASM_MEMCPY is not set +# CONFIG_RT_USING_ASM_MEMSET is not set # CONFIG_RT_USING_TINY_FFS is not set # CONFIG_RT_PRINTF_LONGLONG is not set -# end of kservice optimization - CONFIG_RT_DEBUG=y CONFIG_RT_DEBUG_COLOR=y # CONFIG_RT_DEBUG_INIT_CONFIG is not set @@ -50,7 +54,6 @@ CONFIG_RT_USING_EVENT=y CONFIG_RT_USING_MAILBOX=y CONFIG_RT_USING_MESSAGEQUEUE=y # CONFIG_RT_USING_SIGNALS is not set -# end of Inter-Thread communication # # Memory Management @@ -65,7 +68,6 @@ CONFIG_RT_USING_MEMHEAP_AS_HEAP=y # CONFIG_RT_USING_USERHEAP is not set # CONFIG_RT_USING_MEMTRACE is not set CONFIG_RT_USING_HEAP=y -# end of Memory Management # # Kernel Device Object @@ -76,15 +78,12 @@ CONFIG_RT_USING_DEVICE=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" -# end of Kernel Device Object - CONFIG_RT_VER_NUM=0x40100 -# end of RT-Thread Kernel - CONFIG_ARCH_ARM=y CONFIG_RT_USING_CPU_FFS=y CONFIG_ARCH_ARM_CORTEX_M=y CONFIG_ARCH_ARM_CORTEX_M4=y +# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set # # RT-Thread Components @@ -99,7 +98,6 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10 # C++ features # # CONFIG_RT_USING_CPLUSPLUS is not set -# end of C++ features # # Command shell @@ -119,7 +117,6 @@ CONFIG_FINSH_USING_DESCRIPTION=y # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set # CONFIG_FINSH_USING_AUTH is not set CONFIG_FINSH_ARG_MAX=10 -# end of Command shell # # Device virtual file system @@ -154,18 +151,14 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096 # CONFIG_RT_DFS_ELM_USE_ERASE is not set CONFIG_RT_DFS_ELM_REENTRANT=y CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 -# end of elm-chan's FatFs, Generic FAT Filesystem Module - CONFIG_RT_USING_DFS_DEVFS=y # CONFIG_RT_USING_DFS_ROMFS is not set # CONFIG_RT_USING_DFS_RAMFS is not set -# end of Device virtual file system # # Device Drivers # CONFIG_RT_USING_DEVICE_IPC=y -CONFIG_RT_PIPE_BUFSZ=512 # CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set CONFIG_RT_USING_SERIAL=y CONFIG_RT_USING_SERIAL_V1=y @@ -199,10 +192,9 @@ CONFIG_RT_USING_PIN=y # # Using USB # +# CONFIG_RT_USING_USB is not set # CONFIG_RT_USING_USB_HOST is not set # CONFIG_RT_USING_USB_DEVICE is not set -# end of Using USB -# end of Device Drivers # # POSIX layer and C standard library @@ -215,14 +207,20 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # POSIX (Portable Operating System Interface) layer # # CONFIG_RT_USING_POSIX_FS is not set -# CONFIG_RT_USING_POSIX_DELAY is not set +CONFIG_RT_USING_POSIX_DELAY=y # CONFIG_RT_USING_POSIX_GETLINE is not set -# CONFIG_RT_USING_POSIX_MMAP is not set -# CONFIG_RT_USING_POSIX_TERMIOS is not set -# CONFIG_RT_USING_POSIX_AIO is not set # CONFIG_RT_USING_PTHREADS is not set -# end of POSIX (Portable Operating System Interface) layer -# end of POSIX layer and C standard library + +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set + +# +# Socket is in the 'Network' category +# # # Network @@ -232,32 +230,26 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # Socket abstraction layer # # CONFIG_RT_USING_SAL is not set -# end of Socket abstraction layer # # Network interface device # # CONFIG_RT_USING_NETDEV is not set -# end of Network interface device # # light weight TCP/IP stack # # CONFIG_RT_USING_LWIP is not set -# end of light weight TCP/IP stack # # AT commands # # CONFIG_RT_USING_AT is not set -# end of AT commands -# end of Network # # VBUS(Virtual Software BUS) # # CONFIG_RT_USING_VBUS is not set -# end of VBUS(Virtual Software BUS) # # Utilities @@ -267,16 +259,12 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_RT_USING_UTEST is not set # CONFIG_RT_USING_VAR_EXPORT is not set # CONFIG_RT_USING_RT_LINK is not set -# end of Utilities - # CONFIG_RT_USING_LWP is not set -# end of RT-Thread Components # # RT-Thread Utestcases # # CONFIG_RT_USING_UTESTCASES is not set -# end of RT-Thread Utestcases # # RT-Thread online packages @@ -311,17 +299,12 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # Marvell WiFi # # CONFIG_PKG_USING_WLANMARVELL is not set -# end of Marvell WiFi # # Wiced WiFi # # CONFIG_PKG_USING_WLAN_WICED is not set -# end of Wiced WiFi - # CONFIG_PKG_USING_RW007 is not set -# end of Wi-Fi - # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set @@ -343,8 +326,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_JOYLINK is not set -# end of IoT Cloud - # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set # CONFIG_PKG_USING_IPMSG is not set @@ -379,7 +360,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set # CONFIG_PKG_USING_HM is not set # CONFIG_PKG_USING_SMALL_MODBUS is not set -# end of IoT - internet of things # # security packages @@ -389,7 +369,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_TINYCRYPT is not set # CONFIG_PKG_USING_TFM is not set # CONFIG_PKG_USING_YD_CRYPTO is not set -# end of security packages # # language packages @@ -398,7 +377,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_MICROPYTHON is not set # CONFIG_PKG_USING_PIKASCRIPT is not set -# end of language packages # # multimedia packages @@ -407,10 +385,14 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # # LVGL: powerful and easy-to-use embedded GUI library # -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LVGL is not set -# end of LVGL: powerful and easy-to-use embedded GUI library +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_STEMWIN is not set @@ -425,20 +407,11 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_TINYJPEG is not set # CONFIG_PKG_USING_UGUI is not set -# -# u8g2: a monochrome graphic library -# -# CONFIG_PKG_USING_U8G2_OFFICIAL is not set -# CONFIG_PKG_USING_U8G2 is not set -# end of u8g2: a monochrome graphic library - # # PainterEngine: A cross-platform graphics application framework written in C language # # CONFIG_PKG_USING_PAINTERENGINE is not set # CONFIG_PKG_USING_PAINTERENGINE_AUX is not set -# end of PainterEngine: A cross-platform graphics application framework written in C language -# end of multimedia packages # # tools packages @@ -482,12 +455,17 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_SOLAR_TERMS is not set # CONFIG_PKG_USING_GAN_ZHI is not set # CONFIG_PKG_USING_FDT is not set -# end of tools packages # # system packages # +# +# rt_kprintf: enhanced rt_kprintf packages +# +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + # # acceleration: Assembly language or algorithmic acceleration packages # @@ -495,7 +473,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_QFPLIB_M0_FULL is not set # CONFIG_PKG_USING_QFPLIB_M0_TINY is not set # CONFIG_PKG_USING_QFPLIB_M3 is not set -# end of acceleration: Assembly language or algorithmic acceleration packages # # CMSIS: ARM Cortex-M Microcontroller Software Interface Standard @@ -503,7 +480,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_CMSIS_5 is not set # CONFIG_PKG_USING_CMSIS_5_AUX is not set # CONFIG_PKG_USING_CMSIS_RTOS2 is not set -# end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard # # Micrium: Micrium software products porting for RT-Thread @@ -514,8 +490,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_UC_CLK is not set # CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_MODBUS is not set -# end of Micrium: Micrium software products porting for RT-Thread - # CONFIG_PKG_USING_GUIENGINE is not set # CONFIG_PKG_USING_PERSIMMON is not set # CONFIG_PKG_USING_CAIRO is not set @@ -541,8 +515,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_QBOOT is not set # CONFIG_PKG_USING_PPOOL is not set # CONFIG_PKG_USING_OPENAMP is not set -# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set -# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set # CONFIG_PKG_USING_LPM is not set # CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set @@ -550,7 +522,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_WCWIDTH is not set # CONFIG_PKG_USING_MCUBOOT is not set # CONFIG_PKG_USING_TINYUSB is not set -# end of system packages +# CONFIG_PKG_USING_USB_STACK is not set # # peripheral libraries and drivers @@ -627,7 +599,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_MB85RS16 is not set -# end of peripheral libraries and drivers # # AI packages @@ -641,7 +612,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_NAXOS is not set -# end of AI packages # # miscellaneous packages @@ -654,7 +624,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set -# end of samples: kernel and components samples # # entertainment: terminal games and other interesting software packages @@ -668,8 +637,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_SNAKE is not set # CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_DONUT is not set -# end of entertainment: terminal games and other interesting software packages - # CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set @@ -699,9 +666,57 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_TERMBOX is not set -# end of miscellaneous packages -# end of RT-Thread online packages +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_MPLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set + +# +# Network Utilities +# +# CONFIG_PKG_USING_WICED is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RTINSIGHT is not set +# CONFIG_PKG_USING_SMARTCONFIG is not set +# CONFIG_PKG_USING_RTX is not set +# CONFIG_RT_USING_TESTCASE is not set +# CONFIG_PKG_USING_NGHTTP2 is not set +# CONFIG_PKG_USING_AVS is not set +# CONFIG_PKG_USING_ALI_LINKKIT is not set +# CONFIG_PKG_USING_STS is not set +# CONFIG_PKG_USING_DLMS is not set +# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set +# CONFIG_PKG_USING_ZBAR is not set +# CONFIG_PKG_USING_MCF is not set +# CONFIG_PKG_USING_URPC is not set +# CONFIG_PKG_USING_DCM is not set +# CONFIG_PKG_USING_EMQ is not set +# CONFIG_PKG_USING_CFGM is not set +# CONFIG_PKG_USING_RT_CMSIS_DAP is not set +# CONFIG_PKG_USING_SMODULE is not set +# CONFIG_PKG_USING_SNFD is not set +# CONFIG_PKG_USING_UDBD is not set +# CONFIG_PKG_USING_BENCHMARK is not set +# CONFIG_PKG_USING_UBJSON is not set +# CONFIG_PKG_USING_DATATYPE is not set +# CONFIG_PKG_USING_FASTFS is not set +# CONFIG_PKG_USING_RIL is not set +# CONFIG_PKG_USING_WATCH_DCM_SVC is not set +# CONFIG_PKG_USING_WATCH_APP_FWK is not set +# CONFIG_PKG_USING_GUI_TEST is not set +# CONFIG_PKG_USING_PMEM is not set +# CONFIG_PKG_USING_LWRDP is not set +# CONFIG_PKG_USING_MASAN is not set +# CONFIG_PKG_USING_BSDIFF_LIB is not set +# CONFIG_PKG_USING_PRC_DIFF is not set CONFIG_SOC_LPC4088=y # @@ -720,17 +735,13 @@ CONFIG_SOC_LPC4088=y # CONFIG_BSP_USING_UART0=y # CONFIG_BSP_USING_UART2 is not set -# end of UART Drivers -# end of On-chip Peripheral Drivers # # Onboard Peripheral Drivers # # CONFIG_BSP_USING_SDRAM is not set # CONFIG_BSP_USING_LED is not set -# end of Onboard Peripheral Drivers # # Offboard Peripheral Drivers # -# end of Hardware Drivers Config diff --git a/bsp/lpc408x/rtconfig.h b/bsp/lpc408x/rtconfig.h index 477d637f3f3..f22374575e3 100644 --- a/bsp/lpc408x/rtconfig.h +++ b/bsp/lpc408x/rtconfig.h @@ -1,7 +1,8 @@ #ifndef RT_CONFIG_H__ #define RT_CONFIG_H__ -/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */ +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Project Configuration */ /* RT-Thread Kernel */ @@ -18,7 +19,6 @@ /* kservice optimization */ -/* end of kservice optimization */ #define RT_DEBUG #define RT_DEBUG_COLOR @@ -29,7 +29,6 @@ #define RT_USING_EVENT #define RT_USING_MAILBOX #define RT_USING_MESSAGEQUEUE -/* end of Inter-Thread communication */ /* Memory Management */ @@ -38,7 +37,6 @@ #define RT_USING_MEMHEAP_AUTO_BINDING #define RT_USING_MEMHEAP_AS_HEAP #define RT_USING_HEAP -/* end of Memory Management */ /* Kernel Device Object */ @@ -46,9 +44,7 @@ #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart0" -/* end of Kernel Device Object */ #define RT_VER_NUM 0x40100 -/* end of RT-Thread Kernel */ #define ARCH_ARM #define RT_USING_CPU_FFS #define ARCH_ARM_CORTEX_M @@ -63,7 +59,6 @@ /* C++ features */ -/* end of C++ features */ /* Command shell */ @@ -80,7 +75,6 @@ #define MSH_USING_BUILT_IN_COMMANDS #define FINSH_USING_DESCRIPTION #define FINSH_ARG_MAX 10 -/* end of Command shell */ /* Device virtual file system */ @@ -105,14 +99,11 @@ #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 #define RT_DFS_ELM_REENTRANT #define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -/* end of elm-chan's FatFs, Generic FAT Filesystem Module */ #define RT_USING_DFS_DEVFS -/* end of Device virtual file system */ /* Device Drivers */ #define RT_USING_DEVICE_IPC -#define RT_PIPE_BUFSZ 512 #define RT_USING_SERIAL #define RT_USING_SERIAL_V1 #define RT_SERIAL_USING_DMA @@ -121,8 +112,6 @@ /* Using USB */ -/* end of Using USB */ -/* end of Device Drivers */ /* POSIX layer and C standard library */ @@ -131,40 +120,35 @@ /* POSIX (Portable Operating System Interface) layer */ -/* end of POSIX (Portable Operating System Interface) layer */ -/* end of POSIX layer and C standard library */ +#define RT_USING_POSIX_DELAY + +/* Interprocess Communication (IPC) */ + + +/* Socket is in the 'Network' category */ /* Network */ /* Socket abstraction layer */ -/* end of Socket abstraction layer */ /* Network interface device */ -/* end of Network interface device */ /* light weight TCP/IP stack */ -/* end of light weight TCP/IP stack */ /* AT commands */ -/* end of AT commands */ -/* end of Network */ /* VBUS(Virtual Software BUS) */ -/* end of VBUS(Virtual Software BUS) */ /* Utilities */ -/* end of Utilities */ -/* end of RT-Thread Components */ /* RT-Thread Utestcases */ -/* end of RT-Thread Utestcases */ /* RT-Thread online packages */ @@ -175,79 +159,66 @@ /* Marvell WiFi */ -/* end of Marvell WiFi */ /* Wiced WiFi */ -/* end of Wiced WiFi */ -/* end of Wi-Fi */ /* IoT Cloud */ -/* end of IoT Cloud */ -/* end of IoT - internet of things */ /* security packages */ -/* end of security packages */ /* language packages */ -/* end of language packages */ /* multimedia packages */ /* LVGL: powerful and easy-to-use embedded GUI library */ -/* end of LVGL: powerful and easy-to-use embedded GUI library */ /* u8g2: a monochrome graphic library */ -/* end of u8g2: a monochrome graphic library */ /* PainterEngine: A cross-platform graphics application framework written in C language */ -/* end of PainterEngine: A cross-platform graphics application framework written in C language */ -/* end of multimedia packages */ /* tools packages */ -/* end of tools packages */ /* system packages */ +/* rt_kprintf: enhanced rt_kprintf packages */ + + /* acceleration: Assembly language or algorithmic acceleration packages */ -/* end of acceleration: Assembly language or algorithmic acceleration packages */ /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ -/* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ /* Micrium: Micrium software products porting for RT-Thread */ -/* end of Micrium: Micrium software products porting for RT-Thread */ -/* end of system packages */ /* peripheral libraries and drivers */ -/* end of peripheral libraries and drivers */ /* AI packages */ -/* end of AI packages */ /* miscellaneous packages */ /* samples: kernel and components samples */ -/* end of samples: kernel and components samples */ /* entertainment: terminal games and other interesting software packages */ -/* end of entertainment: terminal games and other interesting software packages */ -/* end of miscellaneous packages */ -/* end of RT-Thread online packages */ + +/* Privated Packages of RealThread */ + + +/* Network Utilities */ + #define SOC_LPC4088 /* Hardware Drivers Config */ @@ -258,15 +229,11 @@ /* UART Drivers */ #define BSP_USING_UART0 -/* end of UART Drivers */ -/* end of On-chip Peripheral Drivers */ /* Onboard Peripheral Drivers */ -/* end of Onboard Peripheral Drivers */ /* Offboard Peripheral Drivers */ -/* end of Hardware Drivers Config */ #endif diff --git a/bsp/qemu-vexpress-a9/.config b/bsp/qemu-vexpress-a9/.config index 9febbba0b65..3cbf0af9646 100644 --- a/bsp/qemu-vexpress-a9/.config +++ b/bsp/qemu-vexpress-a9/.config @@ -1,9 +1,13 @@ -# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Project Configuration +# # # RT-Thread Kernel # CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_BIG_ENDIAN is not set # CONFIG_RT_USING_ARCH_DATA_TYPE is not set CONFIG_RT_USING_SMP=y CONFIG_RT_CPUS_NR=2 @@ -28,10 +32,10 @@ CONFIG_RT_TIMER_THREAD_STACK_SIZE=1024 # # CONFIG_RT_KSERVICE_USING_STDLIB is not set # CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set +# CONFIG_RT_USING_ASM_MEMCPY is not set +# CONFIG_RT_USING_ASM_MEMSET is not set # CONFIG_RT_USING_TINY_FFS is not set # CONFIG_RT_PRINTF_LONGLONG is not set -# end of kservice optimization - CONFIG_RT_DEBUG=y CONFIG_RT_DEBUG_COLOR=y # CONFIG_RT_DEBUG_INIT_CONFIG is not set @@ -54,7 +58,6 @@ CONFIG_RT_USING_EVENT=y CONFIG_RT_USING_MAILBOX=y CONFIG_RT_USING_MESSAGEQUEUE=y CONFIG_RT_USING_SIGNALS=y -# end of Inter-Thread communication # # Memory Management @@ -68,7 +71,6 @@ CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_USERHEAP is not set CONFIG_RT_USING_MEMTRACE=y CONFIG_RT_USING_HEAP=y -# end of Memory Management # # Kernel Device Object @@ -79,16 +81,15 @@ CONFIG_RT_USING_INTERRUPT_INFO=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=256 CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" -# end of Kernel Device Object - CONFIG_RT_VER_NUM=0x40100 -# end of RT-Thread Kernel - CONFIG_ARCH_ARM=y CONFIG_RT_USING_CPU_FFS=y CONFIG_ARCH_ARM_CORTEX_A=y +# CONFIG_RT_SMP_AUTO_BOOT is not set CONFIG_RT_USING_GIC_V2=y +# CONFIG_RT_USING_GIC_V3 is not set CONFIG_ARCH_ARM_CORTEX_A9=y +# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set # # RT-Thread Components @@ -104,7 +105,6 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10 # CONFIG_RT_USING_CPLUSPLUS=y # CONFIG_RT_USING_CPLUSPLUS11 is not set -# end of C++ features # # Command shell @@ -124,7 +124,6 @@ CONFIG_FINSH_USING_DESCRIPTION=y # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set # CONFIG_FINSH_USING_AUTH is not set CONFIG_FINSH_ARG_MAX=10 -# end of Command shell # # Device virtual file system @@ -159,19 +158,15 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096 # CONFIG_RT_DFS_ELM_USE_ERASE is not set CONFIG_RT_DFS_ELM_REENTRANT=y CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 -# end of elm-chan's FatFs, Generic FAT Filesystem Module - CONFIG_RT_USING_DFS_DEVFS=y CONFIG_RT_USING_DFS_ROMFS=y CONFIG_RT_USING_DFS_RAMFS=y # CONFIG_RT_USING_DFS_NFS is not set -# end of Device virtual file system # # Device Drivers # CONFIG_RT_USING_DEVICE_IPC=y -CONFIG_RT_PIPE_BUFSZ=512 CONFIG_RT_USING_SYSTEM_WORKQUEUE=y CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048 CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 @@ -229,10 +224,9 @@ CONFIG_RT_USING_WDT=y # # Using USB # +# CONFIG_RT_USING_USB is not set # CONFIG_RT_USING_USB_HOST is not set # CONFIG_RT_USING_USB_DEVICE is not set -# end of Using USB -# end of Device Drivers # # POSIX layer and C standard library @@ -250,15 +244,24 @@ CONFIG_RT_USING_POSIX_FS=y CONFIG_RT_USING_POSIX_DEVIO=y CONFIG_RT_USING_POSIX_POLL=y CONFIG_RT_USING_POSIX_SELECT=y -CONFIG_RT_USING_POSIX_DELAY=y -CONFIG_RT_USING_POSIX_GETLINE=y -CONFIG_RT_USING_POSIX_MMAP=y CONFIG_RT_USING_POSIX_TERMIOS=y CONFIG_RT_USING_POSIX_AIO=y +# CONFIG_RT_USING_POSIX_MMAN is not set +CONFIG_RT_USING_POSIX_DELAY=y +CONFIG_RT_USING_POSIX_GETLINE=y CONFIG_RT_USING_PTHREADS=y CONFIG_PTHREAD_NUM_MAX=8 -# end of POSIX (Portable Operating System Interface) layer -# end of POSIX layer and C standard library + +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +CONFIG_RT_USING_POSIX_MESSAGE_QUEUE=y +CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE=y + +# +# Socket is in the 'Network' category +# # # Network @@ -274,10 +277,7 @@ CONFIG_SAL_INTERNET_CHECK=y # protocol stack implement # CONFIG_SAL_USING_LWIP=y -# end of protocol stack implement - CONFIG_SAL_USING_POSIX=y -# end of Socket abstraction layer # # Network interface device @@ -290,7 +290,7 @@ CONFIG_NETDEV_USING_AUTO_DEFAULT=y # CONFIG_NETDEV_USING_IPV6 is not set CONFIG_NETDEV_IPV4=1 CONFIG_NETDEV_IPV6=0 -# end of Network interface device +# CONFIG_NETDEV_IPV6_SCOPES is not set # # light weight TCP/IP stack @@ -316,8 +316,6 @@ CONFIG_IP_SOF_BROADCAST_RECV=1 CONFIG_RT_LWIP_IPADDR="192.168.1.30" CONFIG_RT_LWIP_GWADDR="192.168.1.1" CONFIG_RT_LWIP_MSKADDR="255.255.255.0" -# end of Static IPv4 Address - CONFIG_RT_LWIP_UDP=y CONFIG_RT_LWIP_TCP=y CONFIG_RT_LWIP_RAW=y @@ -352,22 +350,17 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # CONFIG_RT_LWIP_USING_HW_CHECKSUM is not set CONFIG_RT_LWIP_USING_PING=y # CONFIG_RT_LWIP_DEBUG is not set -# end of light weight TCP/IP stack # # AT commands # # CONFIG_RT_USING_AT is not set -# end of AT commands - # CONFIG_LWIP_USING_DHCPD is not set -# end of Network # # VBUS(Virtual Software BUS) # # CONFIG_RT_USING_VBUS is not set -# end of VBUS(Virtual Software BUS) # # Utilities @@ -377,16 +370,12 @@ CONFIG_RT_LWIP_USING_PING=y # CONFIG_RT_USING_UTEST is not set # CONFIG_RT_USING_VAR_EXPORT is not set # CONFIG_RT_USING_RT_LINK is not set -# end of Utilities - CONFIG_RT_USING_LWP=y -# end of RT-Thread Components # # RT-Thread Utestcases # # CONFIG_RT_USING_UTESTCASES is not set -# end of RT-Thread Utestcases # # RT-Thread online packages @@ -421,17 +410,12 @@ CONFIG_RT_USING_LWP=y # Marvell WiFi # # CONFIG_PKG_USING_WLANMARVELL is not set -# end of Marvell WiFi # # Wiced WiFi # # CONFIG_PKG_USING_WLAN_WICED is not set -# end of Wiced WiFi - # CONFIG_PKG_USING_RW007 is not set -# end of Wi-Fi - # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set @@ -453,8 +437,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_JOYLINK is not set -# end of IoT Cloud - # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set # CONFIG_PKG_USING_IPMSG is not set @@ -489,7 +471,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set # CONFIG_PKG_USING_HM is not set # CONFIG_PKG_USING_SMALL_MODBUS is not set -# end of IoT - internet of things # # security packages @@ -499,7 +480,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_TINYCRYPT is not set # CONFIG_PKG_USING_TFM is not set # CONFIG_PKG_USING_YD_CRYPTO is not set -# end of security packages # # language packages @@ -508,7 +488,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_MICROPYTHON is not set # CONFIG_PKG_USING_PIKASCRIPT is not set -# end of language packages # # multimedia packages @@ -517,10 +496,14 @@ CONFIG_RT_USING_LWP=y # # LVGL: powerful and easy-to-use embedded GUI library # -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LVGL is not set -# end of LVGL: powerful and easy-to-use embedded GUI library +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_STEMWIN is not set @@ -535,20 +518,11 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_TINYJPEG is not set # CONFIG_PKG_USING_UGUI is not set -# -# u8g2: a monochrome graphic library -# -# CONFIG_PKG_USING_U8G2_OFFICIAL is not set -# CONFIG_PKG_USING_U8G2 is not set -# end of u8g2: a monochrome graphic library - # # PainterEngine: A cross-platform graphics application framework written in C language # # CONFIG_PKG_USING_PAINTERENGINE is not set # CONFIG_PKG_USING_PAINTERENGINE_AUX is not set -# end of PainterEngine: A cross-platform graphics application framework written in C language -# end of multimedia packages # # tools packages @@ -592,12 +566,17 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_SOLAR_TERMS is not set # CONFIG_PKG_USING_GAN_ZHI is not set # CONFIG_PKG_USING_FDT is not set -# end of tools packages # # system packages # +# +# rt_kprintf: enhanced rt_kprintf packages +# +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + # # acceleration: Assembly language or algorithmic acceleration packages # @@ -605,7 +584,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_QFPLIB_M0_FULL is not set # CONFIG_PKG_USING_QFPLIB_M0_TINY is not set # CONFIG_PKG_USING_QFPLIB_M3 is not set -# end of acceleration: Assembly language or algorithmic acceleration packages # # CMSIS: ARM Cortex-M Microcontroller Software Interface Standard @@ -613,7 +591,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_CMSIS_5 is not set # CONFIG_PKG_USING_CMSIS_5_AUX is not set # CONFIG_PKG_USING_CMSIS_RTOS2 is not set -# end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard # # Micrium: Micrium software products porting for RT-Thread @@ -624,8 +601,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_UC_CLK is not set # CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_MODBUS is not set -# end of Micrium: Micrium software products porting for RT-Thread - # CONFIG_PKG_USING_GUIENGINE is not set # CONFIG_PKG_USING_PERSIMMON is not set # CONFIG_PKG_USING_CAIRO is not set @@ -651,8 +626,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_QBOOT is not set # CONFIG_PKG_USING_PPOOL is not set # CONFIG_PKG_USING_OPENAMP is not set -# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set -# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set # CONFIG_PKG_USING_LPM is not set # CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set @@ -660,7 +633,7 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_WCWIDTH is not set # CONFIG_PKG_USING_MCUBOOT is not set # CONFIG_PKG_USING_TINYUSB is not set -# end of system packages +# CONFIG_PKG_USING_USB_STACK is not set # # peripheral libraries and drivers @@ -737,7 +710,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_MB85RS16 is not set -# end of peripheral libraries and drivers # # AI packages @@ -751,7 +723,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_NAXOS is not set -# end of AI packages # # miscellaneous packages @@ -764,7 +735,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set -# end of samples: kernel and components samples # # entertainment: terminal games and other interesting software packages @@ -778,8 +748,6 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_SNAKE is not set # CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_DONUT is not set -# end of entertainment: terminal games and other interesting software packages - # CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set @@ -809,11 +777,70 @@ CONFIG_RT_USING_LWP=y # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_TERMBOX is not set -# end of miscellaneous packages -# end of RT-Thread online packages +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_MPLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set + +# +# Network Utilities +# +# CONFIG_PKG_USING_MDNS is not set +# CONFIG_PKG_USING_UPNP is not set +# CONFIG_PKG_USING_WICED is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RTINSIGHT is not set +# CONFIG_PKG_USING_SMARTCONFIG is not set +# CONFIG_PKG_USING_RTX is not set +# CONFIG_RT_USING_TESTCASE is not set +# CONFIG_PKG_USING_NGHTTP2 is not set +# CONFIG_PKG_USING_AVS is not set +# CONFIG_PKG_USING_ALI_LINKKIT is not set +# CONFIG_PKG_USING_STS is not set +# CONFIG_PKG_USING_DLMS is not set +# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set +# CONFIG_PKG_USING_ZBAR is not set +# CONFIG_PKG_USING_MCF is not set +# CONFIG_PKG_USING_URPC is not set +# CONFIG_PKG_USING_DCM is not set +# CONFIG_PKG_USING_EMQ is not set +# CONFIG_PKG_USING_CFGM is not set +# CONFIG_PKG_USING_RT_CMSIS_DAP is not set +# CONFIG_PKG_USING_SMODULE is not set +# CONFIG_PKG_USING_SNFD is not set +# CONFIG_PKG_USING_UDBD is not set +# CONFIG_PKG_USING_BENCHMARK is not set +# CONFIG_PKG_USING_UBJSON is not set +# CONFIG_PKG_USING_DATATYPE is not set +# CONFIG_PKG_USING_FASTFS is not set +# CONFIG_PKG_USING_RIL is not set +# CONFIG_PKG_USING_WATCH_DCM_SVC is not set +# CONFIG_PKG_USING_WATCH_APP_FWK is not set +# CONFIG_PKG_USING_GUI_TEST is not set +# CONFIG_PKG_USING_PMEM is not set +# CONFIG_PKG_USING_LWRDP is not set +# CONFIG_PKG_USING_MASAN is not set +# CONFIG_PKG_USING_BSDIFF_LIB is not set +# CONFIG_PKG_USING_PRC_DIFF is not set + +# +# Hardware Drivers Config +# CONFIG_SOC_VEXPRESS_A9=y + +# +# Onboard Peripheral Drivers +# CONFIG_RT_USING_UART0=y CONFIG_RT_USING_UART1=y +# CONFIG_BSP_USING_LVGL is not set CONFIG_BSP_DRV_EMAC=y # CONFIG_BSP_DRV_AUDIO is not set diff --git a/bsp/qemu-vexpress-a9/drivers/automac.h b/bsp/qemu-vexpress-a9/drivers/automac.h index 567b1f82fb6..ae481cade08 100644 --- a/bsp/qemu-vexpress-a9/drivers/automac.h +++ b/bsp/qemu-vexpress-a9/drivers/automac.h @@ -8,8 +8,8 @@ #define AUTOMAC0 0x52 #define AUTOMAC1 0x54 #define AUTOMAC2 0x00 -#define AUTOMAC3 0x78 -#define AUTOMAC4 0xe7 -#define AUTOMAC5 0x23 +#define AUTOMAC3 0x49 +#define AUTOMAC4 0x36 +#define AUTOMAC5 0x12 #endif diff --git a/bsp/qemu-vexpress-a9/rtconfig.h b/bsp/qemu-vexpress-a9/rtconfig.h index e3f437519cb..12f0080d576 100644 --- a/bsp/qemu-vexpress-a9/rtconfig.h +++ b/bsp/qemu-vexpress-a9/rtconfig.h @@ -1,7 +1,8 @@ #ifndef RT_CONFIG_H__ #define RT_CONFIG_H__ -/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */ +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Project Configuration */ /* RT-Thread Kernel */ @@ -24,7 +25,6 @@ /* kservice optimization */ -/* end of kservice optimization */ #define RT_DEBUG #define RT_DEBUG_COLOR @@ -36,7 +36,6 @@ #define RT_USING_MAILBOX #define RT_USING_MESSAGEQUEUE #define RT_USING_SIGNALS -/* end of Inter-Thread communication */ /* Memory Management */ @@ -45,7 +44,6 @@ #define RT_USING_SMALL_MEM #define RT_USING_MEMTRACE #define RT_USING_HEAP -/* end of Memory Management */ /* Kernel Device Object */ @@ -55,9 +53,7 @@ #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 256 #define RT_CONSOLE_DEVICE_NAME "uart0" -/* end of Kernel Device Object */ #define RT_VER_NUM 0x40100 -/* end of RT-Thread Kernel */ #define ARCH_ARM #define RT_USING_CPU_FFS #define ARCH_ARM_CORTEX_A @@ -74,7 +70,6 @@ /* C++ features */ #define RT_USING_CPLUSPLUS -/* end of C++ features */ /* Command shell */ @@ -91,7 +86,6 @@ #define MSH_USING_BUILT_IN_COMMANDS #define FINSH_USING_DESCRIPTION #define FINSH_ARG_MAX 10 -/* end of Command shell */ /* Device virtual file system */ @@ -116,16 +110,13 @@ #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 #define RT_DFS_ELM_REENTRANT #define RT_DFS_ELM_MUTEX_TIMEOUT 3000 -/* end of elm-chan's FatFs, Generic FAT Filesystem Module */ #define RT_USING_DFS_DEVFS #define RT_USING_DFS_ROMFS #define RT_USING_DFS_RAMFS -/* end of Device virtual file system */ /* Device Drivers */ #define RT_USING_DEVICE_IPC -#define RT_PIPE_BUFSZ 512 #define RT_USING_SYSTEM_WORKQUEUE #define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 #define RT_SYSTEM_WORKQUEUE_PRIORITY 23 @@ -157,8 +148,6 @@ /* Using USB */ -/* end of Using USB */ -/* end of Device Drivers */ /* POSIX layer and C standard library */ @@ -173,15 +162,19 @@ #define RT_USING_POSIX_DEVIO #define RT_USING_POSIX_POLL #define RT_USING_POSIX_SELECT -#define RT_USING_POSIX_DELAY -#define RT_USING_POSIX_GETLINE -#define RT_USING_POSIX_MMAP #define RT_USING_POSIX_TERMIOS #define RT_USING_POSIX_AIO +#define RT_USING_POSIX_DELAY +#define RT_USING_POSIX_GETLINE #define RT_USING_PTHREADS #define PTHREAD_NUM_MAX 8 -/* end of POSIX (Portable Operating System Interface) layer */ -/* end of POSIX layer and C standard library */ + +/* Interprocess Communication (IPC) */ + +#define RT_USING_POSIX_MESSAGE_QUEUE +#define RT_USING_POSIX_MESSAGE_SEMAPHORE + +/* Socket is in the 'Network' category */ /* Network */ @@ -193,9 +186,7 @@ /* protocol stack implement */ #define SAL_USING_LWIP -/* end of protocol stack implement */ #define SAL_USING_POSIX -/* end of Socket abstraction layer */ /* Network interface device */ @@ -206,7 +197,6 @@ #define NETDEV_USING_AUTO_DEFAULT #define NETDEV_IPV4 1 #define NETDEV_IPV6 0 -/* end of Network interface device */ /* light weight TCP/IP stack */ @@ -224,7 +214,6 @@ #define RT_LWIP_IPADDR "192.168.1.30" #define RT_LWIP_GWADDR "192.168.1.1" #define RT_LWIP_MSKADDR "255.255.255.0" -/* end of Static IPv4 Address */ #define RT_LWIP_UDP #define RT_LWIP_TCP #define RT_LWIP_RAW @@ -252,26 +241,19 @@ #define LWIP_SO_LINGER 0 #define LWIP_NETIF_LOOPBACK 0 #define RT_LWIP_USING_PING -/* end of light weight TCP/IP stack */ /* AT commands */ -/* end of AT commands */ -/* end of Network */ /* VBUS(Virtual Software BUS) */ -/* end of VBUS(Virtual Software BUS) */ /* Utilities */ -/* end of Utilities */ #define RT_USING_LWP -/* end of RT-Thread Components */ /* RT-Thread Utestcases */ -/* end of RT-Thread Utestcases */ /* RT-Thread online packages */ @@ -282,80 +264,73 @@ /* Marvell WiFi */ -/* end of Marvell WiFi */ /* Wiced WiFi */ -/* end of Wiced WiFi */ -/* end of Wi-Fi */ /* IoT Cloud */ -/* end of IoT Cloud */ -/* end of IoT - internet of things */ /* security packages */ -/* end of security packages */ /* language packages */ -/* end of language packages */ /* multimedia packages */ /* LVGL: powerful and easy-to-use embedded GUI library */ -/* end of LVGL: powerful and easy-to-use embedded GUI library */ /* u8g2: a monochrome graphic library */ -/* end of u8g2: a monochrome graphic library */ /* PainterEngine: A cross-platform graphics application framework written in C language */ -/* end of PainterEngine: A cross-platform graphics application framework written in C language */ -/* end of multimedia packages */ /* tools packages */ -/* end of tools packages */ /* system packages */ +/* rt_kprintf: enhanced rt_kprintf packages */ + + /* acceleration: Assembly language or algorithmic acceleration packages */ -/* end of acceleration: Assembly language or algorithmic acceleration packages */ /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ -/* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ /* Micrium: Micrium software products porting for RT-Thread */ -/* end of Micrium: Micrium software products porting for RT-Thread */ -/* end of system packages */ /* peripheral libraries and drivers */ -/* end of peripheral libraries and drivers */ /* AI packages */ -/* end of AI packages */ /* miscellaneous packages */ /* samples: kernel and components samples */ -/* end of samples: kernel and components samples */ /* entertainment: terminal games and other interesting software packages */ -/* end of entertainment: terminal games and other interesting software packages */ -/* end of miscellaneous packages */ -/* end of RT-Thread online packages */ + +/* Privated Packages of RealThread */ + + +/* Network Utilities */ + + +/* Hardware Drivers Config */ + #define SOC_VEXPRESS_A9 + +/* Onboard Peripheral Drivers */ + #define RT_USING_UART0 #define RT_USING_UART1 #define BSP_DRV_EMAC diff --git a/bsp/qemu-vexpress-gemini/.config b/bsp/qemu-vexpress-gemini/.config index 956d7e5c4d4..6d78de68605 100644 --- a/bsp/qemu-vexpress-gemini/.config +++ b/bsp/qemu-vexpress-gemini/.config @@ -1,9 +1,13 @@ -# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Project Configuration +# # # RT-Thread Kernel # CONFIG_RT_NAME_MAX=6 +# CONFIG_RT_USING_BIG_ENDIAN is not set # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=4 @@ -24,10 +28,10 @@ CONFIG_IDLE_THREAD_STACK_SIZE=512 # # CONFIG_RT_KSERVICE_USING_STDLIB is not set # CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set +# CONFIG_RT_USING_ASM_MEMCPY is not set +# CONFIG_RT_USING_ASM_MEMSET is not set # CONFIG_RT_USING_TINY_FFS is not set # CONFIG_RT_PRINTF_LONGLONG is not set -# end of kservice optimization - CONFIG_RT_DEBUG=y CONFIG_RT_DEBUG_COLOR=y # CONFIG_RT_DEBUG_INIT_CONFIG is not set @@ -50,7 +54,6 @@ CONFIG_RT_USING_EVENT=y CONFIG_RT_USING_MAILBOX=y CONFIG_RT_USING_MESSAGEQUEUE=y # CONFIG_RT_USING_SIGNALS is not set -# end of Inter-Thread communication # # Memory Management @@ -63,7 +66,6 @@ CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_USERHEAP is not set # CONFIG_RT_USING_MEMTRACE is not set CONFIG_RT_USING_HEAP=y -# end of Memory Management # # Kernel Device Object @@ -74,11 +76,7 @@ CONFIG_RT_USING_INTERRUPT_INFO=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" -# end of Kernel Device Object - CONFIG_RT_VER_NUM=0x40100 -# end of RT-Thread Kernel - CONFIG_ARCH_ARM=y CONFIG_RT_USING_CPU_FFS=y CONFIG_ARCH_ARM_CORTEX_A=y @@ -86,18 +84,19 @@ CONFIG_ARCH_ARM_CORTEX_A=y CONFIG_RT_USING_GIC_V2=y # CONFIG_RT_USING_GIC_V3 is not set CONFIG_ARCH_ARM_CORTEX_A9=y +# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set # # RT-Thread Components # CONFIG_RT_USING_COMPONENTS_INIT=y +# CONFIG_RT_USING_USER_MAIN is not set # CONFIG_RT_USING_LEGACY is not set # # C++ features # # CONFIG_RT_USING_CPLUSPLUS is not set -# end of C++ features # # Command shell @@ -117,7 +116,6 @@ CONFIG_FINSH_USING_DESCRIPTION=y # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set # CONFIG_FINSH_USING_AUTH is not set CONFIG_FINSH_ARG_MAX=10 -# end of Command shell # # Device virtual file system @@ -133,13 +131,11 @@ CONFIG_DFS_FD_MAX=4 CONFIG_RT_USING_DFS_DEVFS=y # CONFIG_RT_USING_DFS_ROMFS is not set # CONFIG_RT_USING_DFS_RAMFS is not set -# end of Device virtual file system # # Device Drivers # CONFIG_RT_USING_DEVICE_IPC=y -CONFIG_RT_PIPE_BUFSZ=512 # CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set CONFIG_RT_USING_SERIAL=y CONFIG_RT_USING_SERIAL_V1=y @@ -173,10 +169,9 @@ CONFIG_RT_USING_PIN=y # # Using USB # +# CONFIG_RT_USING_USB is not set # CONFIG_RT_USING_USB_HOST is not set # CONFIG_RT_USING_USB_DEVICE is not set -# end of Using USB -# end of Device Drivers # # POSIX layer and C standard library @@ -191,15 +186,21 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # POSIX (Portable Operating System Interface) layer # # CONFIG_RT_USING_POSIX_FS is not set -# CONFIG_RT_USING_POSIX_DELAY is not set +CONFIG_RT_USING_POSIX_DELAY=y # CONFIG_RT_USING_POSIX_GETLINE is not set -# CONFIG_RT_USING_POSIX_MMAP is not set -# CONFIG_RT_USING_POSIX_TERMIOS is not set -# CONFIG_RT_USING_POSIX_AIO is not set CONFIG_RT_USING_PTHREADS=y CONFIG_PTHREAD_NUM_MAX=8 -# end of POSIX (Portable Operating System Interface) layer -# end of POSIX layer and C standard library + +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +CONFIG_RT_USING_POSIX_MESSAGE_QUEUE=y +CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE=y + +# +# Socket is in the 'Network' category +# # # Network @@ -209,26 +210,21 @@ CONFIG_PTHREAD_NUM_MAX=8 # Socket abstraction layer # # CONFIG_RT_USING_SAL is not set -# end of Socket abstraction layer # # Network interface device # # CONFIG_RT_USING_NETDEV is not set -# end of Network interface device # # light weight TCP/IP stack # # CONFIG_RT_USING_LWIP is not set -# end of light weight TCP/IP stack # # AT commands # # CONFIG_RT_USING_AT is not set -# end of AT commands -# end of Network # # VBUS(Virtual Software BUS) @@ -243,7 +239,6 @@ CONFIG_RT_VBUS_GUEST_VIRQ=14 CONFIG_RT_VBUS_HOST_VIRQ=15 CONFIG_RT_VBUS_SHELL_DEV_NAME="vbser0" CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" -# end of VBUS(Virtual Software BUS) # # Utilities @@ -253,16 +248,12 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_RT_USING_UTEST is not set # CONFIG_RT_USING_VAR_EXPORT is not set # CONFIG_RT_USING_RT_LINK is not set -# end of Utilities - # CONFIG_RT_USING_LWP is not set -# end of RT-Thread Components # # RT-Thread Utestcases # # CONFIG_RT_USING_UTESTCASES is not set -# end of RT-Thread Utestcases # # RT-Thread online packages @@ -297,17 +288,12 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # Marvell WiFi # # CONFIG_PKG_USING_WLANMARVELL is not set -# end of Marvell WiFi # # Wiced WiFi # # CONFIG_PKG_USING_WLAN_WICED is not set -# end of Wiced WiFi - # CONFIG_PKG_USING_RW007 is not set -# end of Wi-Fi - # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set @@ -329,8 +315,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_JOYLINK is not set -# end of IoT Cloud - # CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set # CONFIG_PKG_USING_IPMSG is not set @@ -365,7 +349,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set # CONFIG_PKG_USING_HM is not set # CONFIG_PKG_USING_SMALL_MODBUS is not set -# end of IoT - internet of things # # security packages @@ -375,7 +358,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_TINYCRYPT is not set # CONFIG_PKG_USING_TFM is not set # CONFIG_PKG_USING_YD_CRYPTO is not set -# end of security packages # # language packages @@ -384,7 +366,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_MICROPYTHON is not set # CONFIG_PKG_USING_PIKASCRIPT is not set -# end of language packages # # multimedia packages @@ -393,10 +374,14 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # # LVGL: powerful and easy-to-use embedded GUI library # -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LVGL is not set -# end of LVGL: powerful and easy-to-use embedded GUI library +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_STEMWIN is not set @@ -411,20 +396,11 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_TINYJPEG is not set # CONFIG_PKG_USING_UGUI is not set -# -# u8g2: a monochrome graphic library -# -# CONFIG_PKG_USING_U8G2_OFFICIAL is not set -# CONFIG_PKG_USING_U8G2 is not set -# end of u8g2: a monochrome graphic library - # # PainterEngine: A cross-platform graphics application framework written in C language # # CONFIG_PKG_USING_PAINTERENGINE is not set # CONFIG_PKG_USING_PAINTERENGINE_AUX is not set -# end of PainterEngine: A cross-platform graphics application framework written in C language -# end of multimedia packages # # tools packages @@ -468,12 +444,17 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_SOLAR_TERMS is not set # CONFIG_PKG_USING_GAN_ZHI is not set # CONFIG_PKG_USING_FDT is not set -# end of tools packages # # system packages # +# +# rt_kprintf: enhanced rt_kprintf packages +# +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + # # acceleration: Assembly language or algorithmic acceleration packages # @@ -481,7 +462,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_QFPLIB_M0_FULL is not set # CONFIG_PKG_USING_QFPLIB_M0_TINY is not set # CONFIG_PKG_USING_QFPLIB_M3 is not set -# end of acceleration: Assembly language or algorithmic acceleration packages # # CMSIS: ARM Cortex-M Microcontroller Software Interface Standard @@ -489,7 +469,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_CMSIS_5 is not set # CONFIG_PKG_USING_CMSIS_5_AUX is not set # CONFIG_PKG_USING_CMSIS_RTOS2 is not set -# end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard # # Micrium: Micrium software products porting for RT-Thread @@ -500,8 +479,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_UC_CLK is not set # CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_MODBUS is not set -# end of Micrium: Micrium software products porting for RT-Thread - # CONFIG_PKG_USING_GUIENGINE is not set # CONFIG_PKG_USING_PERSIMMON is not set # CONFIG_PKG_USING_CAIRO is not set @@ -527,8 +504,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_QBOOT is not set # CONFIG_PKG_USING_PPOOL is not set # CONFIG_PKG_USING_OPENAMP is not set -# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set -# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set # CONFIG_PKG_USING_LPM is not set # CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set @@ -536,7 +511,7 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_WCWIDTH is not set # CONFIG_PKG_USING_MCUBOOT is not set # CONFIG_PKG_USING_TINYUSB is not set -# end of system packages +# CONFIG_PKG_USING_USB_STACK is not set # # peripheral libraries and drivers @@ -613,7 +588,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_MB85RS16 is not set -# end of peripheral libraries and drivers # # AI packages @@ -627,7 +601,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_NAXOS is not set -# end of AI packages # # miscellaneous packages @@ -640,7 +613,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set -# end of samples: kernel and components samples # # entertainment: terminal games and other interesting software packages @@ -654,8 +626,6 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_SNAKE is not set # CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_DONUT is not set -# end of entertainment: terminal games and other interesting software packages - # CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set @@ -685,9 +655,57 @@ CONFIG_RT_VBUS_RFS_DEV_NAME="rfs" # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_TERMBOX is not set -# end of miscellaneous packages -# end of RT-Thread online packages +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_MPLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set + +# +# Network Utilities +# +# CONFIG_PKG_USING_WICED is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RTINSIGHT is not set +# CONFIG_PKG_USING_SMARTCONFIG is not set +# CONFIG_PKG_USING_RTX is not set +# CONFIG_RT_USING_TESTCASE is not set +# CONFIG_PKG_USING_NGHTTP2 is not set +# CONFIG_PKG_USING_AVS is not set +# CONFIG_PKG_USING_ALI_LINKKIT is not set +# CONFIG_PKG_USING_STS is not set +# CONFIG_PKG_USING_DLMS is not set +# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set +# CONFIG_PKG_USING_ZBAR is not set +# CONFIG_PKG_USING_MCF is not set +# CONFIG_PKG_USING_URPC is not set +# CONFIG_PKG_USING_DCM is not set +# CONFIG_PKG_USING_EMQ is not set +# CONFIG_PKG_USING_CFGM is not set +# CONFIG_PKG_USING_RT_CMSIS_DAP is not set +# CONFIG_PKG_USING_SMODULE is not set +# CONFIG_PKG_USING_SNFD is not set +# CONFIG_PKG_USING_UDBD is not set +# CONFIG_PKG_USING_BENCHMARK is not set +# CONFIG_PKG_USING_UBJSON is not set +# CONFIG_PKG_USING_DATATYPE is not set +# CONFIG_PKG_USING_FASTFS is not set +# CONFIG_PKG_USING_RIL is not set +# CONFIG_PKG_USING_WATCH_DCM_SVC is not set +# CONFIG_PKG_USING_WATCH_APP_FWK is not set +# CONFIG_PKG_USING_GUI_TEST is not set +# CONFIG_PKG_USING_PMEM is not set +# CONFIG_PKG_USING_LWRDP is not set +# CONFIG_PKG_USING_MASAN is not set +# CONFIG_PKG_USING_BSDIFF_LIB is not set +# CONFIG_PKG_USING_PRC_DIFF is not set CONFIG_SOC_VEXPRESS_GEMINI=y # CONFIG_RT_USING_UART0 is not set CONFIG_RT_USING_UART1=y diff --git a/bsp/qemu-vexpress-gemini/rtconfig.h b/bsp/qemu-vexpress-gemini/rtconfig.h index c598e2adebc..45651de7d9b 100644 --- a/bsp/qemu-vexpress-gemini/rtconfig.h +++ b/bsp/qemu-vexpress-gemini/rtconfig.h @@ -1,7 +1,8 @@ #ifndef RT_CONFIG_H__ #define RT_CONFIG_H__ -/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */ +/* Automatically generated file; DO NOT EDIT. */ +/* RT-Thread Project Configuration */ /* RT-Thread Kernel */ @@ -18,7 +19,6 @@ /* kservice optimization */ -/* end of kservice optimization */ #define RT_DEBUG #define RT_DEBUG_COLOR @@ -29,14 +29,12 @@ #define RT_USING_EVENT #define RT_USING_MAILBOX #define RT_USING_MESSAGEQUEUE -/* end of Inter-Thread communication */ /* Memory Management */ #define RT_USING_MEMPOOL #define RT_USING_SMALL_MEM #define RT_USING_HEAP -/* end of Memory Management */ /* Kernel Device Object */ @@ -45,9 +43,7 @@ #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart1" -/* end of Kernel Device Object */ #define RT_VER_NUM 0x40100 -/* end of RT-Thread Kernel */ #define ARCH_ARM #define RT_USING_CPU_FFS #define ARCH_ARM_CORTEX_A @@ -60,7 +56,6 @@ /* C++ features */ -/* end of C++ features */ /* Command shell */ @@ -77,7 +72,6 @@ #define MSH_USING_BUILT_IN_COMMANDS #define FINSH_USING_DESCRIPTION #define FINSH_ARG_MAX 10 -/* end of Command shell */ /* Device virtual file system */ @@ -88,12 +82,10 @@ #define DFS_FILESYSTEM_TYPES_MAX 2 #define DFS_FD_MAX 4 #define RT_USING_DFS_DEVFS -/* end of Device virtual file system */ /* Device Drivers */ #define RT_USING_DEVICE_IPC -#define RT_PIPE_BUFSZ 512 #define RT_USING_SERIAL #define RT_USING_SERIAL_V1 #define RT_SERIAL_USING_DMA @@ -102,8 +94,6 @@ /* Using USB */ -/* end of Using USB */ -/* end of Device Drivers */ /* POSIX layer and C standard library */ @@ -113,29 +103,30 @@ /* POSIX (Portable Operating System Interface) layer */ +#define RT_USING_POSIX_DELAY #define RT_USING_PTHREADS #define PTHREAD_NUM_MAX 8 -/* end of POSIX (Portable Operating System Interface) layer */ -/* end of POSIX layer and C standard library */ + +/* Interprocess Communication (IPC) */ + +#define RT_USING_POSIX_MESSAGE_QUEUE +#define RT_USING_POSIX_MESSAGE_SEMAPHORE + +/* Socket is in the 'Network' category */ /* Network */ /* Socket abstraction layer */ -/* end of Socket abstraction layer */ /* Network interface device */ -/* end of Network interface device */ /* light weight TCP/IP stack */ -/* end of light weight TCP/IP stack */ /* AT commands */ -/* end of AT commands */ -/* end of Network */ /* VBUS(Virtual Software BUS) */ @@ -147,16 +138,12 @@ #define RT_VBUS_HOST_VIRQ 15 #define RT_VBUS_SHELL_DEV_NAME "vbser0" #define RT_VBUS_RFS_DEV_NAME "rfs" -/* end of VBUS(Virtual Software BUS) */ /* Utilities */ -/* end of Utilities */ -/* end of RT-Thread Components */ /* RT-Thread Utestcases */ -/* end of RT-Thread Utestcases */ /* RT-Thread online packages */ @@ -167,79 +154,66 @@ /* Marvell WiFi */ -/* end of Marvell WiFi */ /* Wiced WiFi */ -/* end of Wiced WiFi */ -/* end of Wi-Fi */ /* IoT Cloud */ -/* end of IoT Cloud */ -/* end of IoT - internet of things */ /* security packages */ -/* end of security packages */ /* language packages */ -/* end of language packages */ /* multimedia packages */ /* LVGL: powerful and easy-to-use embedded GUI library */ -/* end of LVGL: powerful and easy-to-use embedded GUI library */ /* u8g2: a monochrome graphic library */ -/* end of u8g2: a monochrome graphic library */ /* PainterEngine: A cross-platform graphics application framework written in C language */ -/* end of PainterEngine: A cross-platform graphics application framework written in C language */ -/* end of multimedia packages */ /* tools packages */ -/* end of tools packages */ /* system packages */ +/* rt_kprintf: enhanced rt_kprintf packages */ + + /* acceleration: Assembly language or algorithmic acceleration packages */ -/* end of acceleration: Assembly language or algorithmic acceleration packages */ /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ -/* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */ /* Micrium: Micrium software products porting for RT-Thread */ -/* end of Micrium: Micrium software products porting for RT-Thread */ -/* end of system packages */ /* peripheral libraries and drivers */ -/* end of peripheral libraries and drivers */ /* AI packages */ -/* end of AI packages */ /* miscellaneous packages */ /* samples: kernel and components samples */ -/* end of samples: kernel and components samples */ /* entertainment: terminal games and other interesting software packages */ -/* end of entertainment: terminal games and other interesting software packages */ -/* end of miscellaneous packages */ -/* end of RT-Thread online packages */ + +/* Privated Packages of RealThread */ + + +/* Network Utilities */ + #define SOC_VEXPRESS_GEMINI #define RT_USING_UART1 diff --git a/bsp/raspberry-pi/raspi4-32/.config b/bsp/raspberry-pi/raspi4-32/.config index 670259ce0df..90b6d6edce2 100644 --- a/bsp/raspberry-pi/raspi4-32/.config +++ b/bsp/raspberry-pi/raspi4-32/.config @@ -159,7 +159,6 @@ CONFIG_RT_USING_DFS_DEVFS=y # Device Drivers # CONFIG_RT_USING_DEVICE_IPC=y -CONFIG_RT_PIPE_BUFSZ=512 CONFIG_RT_USING_SYSTEM_WORKQUEUE=y CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048 CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 @@ -232,11 +231,22 @@ CONFIG_RT_USING_POSIX_POLL=y CONFIG_RT_USING_POSIX_SELECT=y # CONFIG_RT_USING_POSIX_TERMIOS is not set # CONFIG_RT_USING_POSIX_AIO is not set -# CONFIG_RT_USING_POSIX_MMAP is not set -# CONFIG_RT_USING_POSIX_DELAY is not set +# CONFIG_RT_USING_POSIX_MMAN is not set +CONFIG_RT_USING_POSIX_DELAY=y # CONFIG_RT_USING_POSIX_GETLINE is not set # CONFIG_RT_USING_PTHREADS is not set +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set + +# +# Socket is in the 'Network' category +# + # # Network # @@ -469,8 +479,14 @@ CONFIG_RT_LWIP_USING_PING=y # # LVGL: powerful and easy-to-use embedded GUI library # -# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LVGL is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set + +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_STEMWIN is not set @@ -485,12 +501,6 @@ CONFIG_RT_LWIP_USING_PING=y # CONFIG_PKG_USING_TINYJPEG is not set # CONFIG_PKG_USING_UGUI is not set -# -# u8g2: a monochrome graphic library -# -# CONFIG_PKG_USING_U8G2_OFFICIAL is not set -# CONFIG_PKG_USING_U8G2 is not set - # # PainterEngine: A cross-platform graphics application framework written in C language # @@ -544,6 +554,12 @@ CONFIG_RT_LWIP_USING_PING=y # system packages # +# +# rt_kprintf: enhanced rt_kprintf packages +# +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + # # acceleration: Assembly language or algorithmic acceleration packages # @@ -592,8 +608,6 @@ CONFIG_RT_LWIP_USING_PING=y # CONFIG_PKG_USING_QBOOT is not set # CONFIG_PKG_USING_PPOOL is not set # CONFIG_PKG_USING_OPENAMP is not set -# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set -# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set # CONFIG_PKG_USING_LPM is not set # CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set @@ -601,6 +615,7 @@ CONFIG_RT_LWIP_USING_PING=y # CONFIG_PKG_USING_WCWIDTH is not set # CONFIG_PKG_USING_MCUBOOT is not set # CONFIG_PKG_USING_TINYUSB is not set +# CONFIG_PKG_USING_USB_STACK is not set # # peripheral libraries and drivers @@ -744,6 +759,59 @@ CONFIG_RT_LWIP_USING_PING=y # CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_COWSAY is not set # CONFIG_PKG_USING_TERMBOX is not set + +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_MPLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set + +# +# Network Utilities +# +# CONFIG_PKG_USING_MDNS is not set +# CONFIG_PKG_USING_UPNP is not set +# CONFIG_PKG_USING_WICED is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RTINSIGHT is not set +# CONFIG_PKG_USING_SMARTCONFIG is not set +# CONFIG_PKG_USING_RTX is not set +# CONFIG_RT_USING_TESTCASE is not set +# CONFIG_PKG_USING_NGHTTP2 is not set +# CONFIG_PKG_USING_AVS is not set +# CONFIG_PKG_USING_ALI_LINKKIT is not set +# CONFIG_PKG_USING_STS is not set +# CONFIG_PKG_USING_DLMS is not set +# CONFIG_PKG_USING_AUDIO_FRAMEWORK is not set +# CONFIG_PKG_USING_ZBAR is not set +# CONFIG_PKG_USING_MCF is not set +# CONFIG_PKG_USING_URPC is not set +# CONFIG_PKG_USING_DCM is not set +# CONFIG_PKG_USING_EMQ is not set +# CONFIG_PKG_USING_CFGM is not set +# CONFIG_PKG_USING_RT_CMSIS_DAP is not set +# CONFIG_PKG_USING_SMODULE is not set +# CONFIG_PKG_USING_SNFD is not set +# CONFIG_PKG_USING_UDBD is not set +# CONFIG_PKG_USING_BENCHMARK is not set +# CONFIG_PKG_USING_UBJSON is not set +# CONFIG_PKG_USING_DATATYPE is not set +# CONFIG_PKG_USING_FASTFS is not set +# CONFIG_PKG_USING_RIL is not set +# CONFIG_PKG_USING_WATCH_DCM_SVC is not set +# CONFIG_PKG_USING_WATCH_APP_FWK is not set +# CONFIG_PKG_USING_GUI_TEST is not set +# CONFIG_PKG_USING_PMEM is not set +# CONFIG_PKG_USING_LWRDP is not set +# CONFIG_PKG_USING_MASAN is not set +# CONFIG_PKG_USING_BSDIFF_LIB is not set +# CONFIG_PKG_USING_PRC_DIFF is not set CONFIG_BCM2711_SOC=y # CONFIG_BSP_SUPPORT_FPU is not set diff --git a/bsp/raspberry-pi/raspi4-32/rtconfig.h b/bsp/raspberry-pi/raspi4-32/rtconfig.h index 9ada92a09d3..d2b5d13c788 100644 --- a/bsp/raspberry-pi/raspi4-32/rtconfig.h +++ b/bsp/raspberry-pi/raspi4-32/rtconfig.h @@ -102,7 +102,6 @@ /* Device Drivers */ #define RT_USING_DEVICE_IPC -#define RT_PIPE_BUFSZ 512 #define RT_USING_SYSTEM_WORKQUEUE #define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048 #define RT_SYSTEM_WORKQUEUE_PRIORITY 23 @@ -137,6 +136,12 @@ #define RT_USING_POSIX_FS #define RT_USING_POSIX_POLL #define RT_USING_POSIX_SELECT +#define RT_USING_POSIX_DELAY + +/* Interprocess Communication (IPC) */ + + +/* Socket is in the 'Network' category */ /* Network */ @@ -254,6 +259,9 @@ /* system packages */ +/* rt_kprintf: enhanced rt_kprintf packages */ + + /* acceleration: Assembly language or algorithmic acceleration packages */ @@ -276,6 +284,12 @@ /* entertainment: terminal games and other interesting software packages */ + +/* Privated Packages of RealThread */ + + +/* Network Utilities */ + #define BCM2711_SOC /* Hardware Drivers Config */ From c94242b7286bb139cfe606313d93d3b3b85e9b30 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 19:57:46 +0800 Subject: [PATCH 19/22] [fix] gcc-10.2.1, problem of compilation for qemu. --- components/libc/posix/pthreads/SConscript | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/components/libc/posix/pthreads/SConscript b/components/libc/posix/pthreads/SConscript index a95f9076211..1b5b0b2a70f 100644 --- a/components/libc/posix/pthreads/SConscript +++ b/components/libc/posix/pthreads/SConscript @@ -4,7 +4,21 @@ from utils import VersionCmp cwd = GetCurrentDir() src = Glob('*.c') CPPPATH = [cwd] +CPPDEFINES = [] -group = DefineGroup('POSIX', src, depend = ['RT_USING_PTHREADS'], CPPPATH = CPPPATH) +# only enable POSIX.1b-1993 Real-time extensions +libc_ver = GetDepend('LIBC_VERSION') +try: + ver = libc_ver.split(' ') + ver = ver[1] + + # gcc10.2.1 -> 3.0; we need basal definition for '_POSIX_C_SOURCE'. + # if LIBC_VERSION > "2.5.0", CPPDEFINES = '_POSIX_C_SOURCE=199309L' + if VersionCmp(ver, "2.5.0") == 1: + CPPDEFINES = ['_POSIX_C_SOURCE=199309L'] +except : + pass + +group = DefineGroup('POSIX', src, depend = ['RT_USING_PTHREADS'], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) Return('group') From bae54e2d5a1041449437f462828669ffe2e91842 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 19:58:23 +0800 Subject: [PATCH 20/22] [restore] automac.h --- bsp/qemu-vexpress-a9/drivers/automac.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsp/qemu-vexpress-a9/drivers/automac.h b/bsp/qemu-vexpress-a9/drivers/automac.h index ae481cade08..567b1f82fb6 100644 --- a/bsp/qemu-vexpress-a9/drivers/automac.h +++ b/bsp/qemu-vexpress-a9/drivers/automac.h @@ -8,8 +8,8 @@ #define AUTOMAC0 0x52 #define AUTOMAC1 0x54 #define AUTOMAC2 0x00 -#define AUTOMAC3 0x49 -#define AUTOMAC4 0x36 -#define AUTOMAC5 0x12 +#define AUTOMAC3 0x78 +#define AUTOMAC4 0xe7 +#define AUTOMAC5 0x23 #endif From ceb8d842e22e7d78afd15ccbc31fde508ca258d8 Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 20:01:13 +0800 Subject: [PATCH 21/22] [fix] the problem for loongson. --- components/libc/compilers/common/nogcc/sys/_timespec.h | 3 +++ components/libc/compilers/common/sys/time.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/components/libc/compilers/common/nogcc/sys/_timespec.h b/components/libc/compilers/common/nogcc/sys/_timespec.h index 804ce18d7dc..7ec076010c4 100644 --- a/components/libc/compilers/common/nogcc/sys/_timespec.h +++ b/components/libc/compilers/common/nogcc/sys/_timespec.h @@ -19,9 +19,12 @@ typedef _TIME_T_ time_t; #define _TIME_T_DECLARED #endif +#ifndef _TIMESPEC_DEFINED +#define _TIMESPEC_DEFINED struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; +#endif #endif /* !_SYS__TIMESPEC_H_ */ diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h index 93e3bb7ba47..61714fa6aaa 100644 --- a/components/libc/compilers/common/sys/time.h +++ b/components/libc/compilers/common/sys/time.h @@ -57,12 +57,15 @@ struct timeval #if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/) && \ !(defined(__ICCARM__) && (__VER__ >= 8010001)) && \ !defined(_WIN32) +#ifndef _TIMESPEC_DEFINED +#define _TIMESPEC_DEFINED struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; #endif +#endif int stime(const time_t *t); time_t timegm(struct tm * const t); From 3f3a68ff6519cf9f1382925d88660caa9e122ace Mon Sep 17 00:00:00 2001 From: liuxianliang Date: Tue, 14 Dec 2021 21:06:04 +0800 Subject: [PATCH 22/22] [fix] the compile problem for loongson. --- .../libc/compilers/common/nogcc/sys/_timespec.h | 15 ++++++++------- components/libc/compilers/common/sys/time.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/libc/compilers/common/nogcc/sys/_timespec.h b/components/libc/compilers/common/nogcc/sys/_timespec.h index 7ec076010c4..3f705b86c13 100644 --- a/components/libc/compilers/common/nogcc/sys/_timespec.h +++ b/components/libc/compilers/common/nogcc/sys/_timespec.h @@ -9,21 +9,22 @@ */ #ifndef _SYS__TIMESPEC_H_ -#define _SYS__TIMESPEC_H_ +#define _SYS__TIMESPEC_H_ #include #if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED) -typedef _TIME_T_ time_t; -#define __time_t_defined -#define _TIME_T_DECLARED +typedef _TIME_T_ time_t; +#define __time_t_defined +#define _TIME_T_DECLARED #endif #ifndef _TIMESPEC_DEFINED #define _TIMESPEC_DEFINED -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* and nanoseconds */ +struct timespec +{ + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ }; #endif diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h index 61714fa6aaa..21a69f892dd 100644 --- a/components/libc/compilers/common/sys/time.h +++ b/components/libc/compilers/common/sys/time.h @@ -14,7 +14,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" { @@ -53,6 +52,7 @@ struct timeval }; #endif #endif /* _TIMEVAL_DEFINED */ +#include #if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/) && \ !(defined(__ICCARM__) && (__VER__ >= 8010001)) && \