From 57e8ec91a2e37b498949799c2ac8ca8a29a60968 Mon Sep 17 00:00:00 2001 From: windows Date: Wed, 22 Nov 2023 23:07:31 +0800 Subject: [PATCH 1/3] [bsp][imx6ul] Code update. There lacks these two macros. Signed-off-by: windows --- bsp/imx6ul/rtconfig.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsp/imx6ul/rtconfig.h b/bsp/imx6ul/rtconfig.h index e71a36b7c5..600d552144 100644 --- a/bsp/imx6ul/rtconfig.h +++ b/bsp/imx6ul/rtconfig.h @@ -9,6 +9,7 @@ /* RT-Thread Kernel */ #define RT_NAME_MAX 8 +#define RT_CPUS_NR 1 #define RT_ALIGN_SIZE 8 #define RT_THREAD_PRIORITY_32 #define RT_THREAD_PRIORITY_MAX 32 @@ -49,6 +50,7 @@ #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart1" #define RT_VER_NUM 0x50002 +#define RT_BACKTRACE_LEVEL_MAX_NR 32 #define RT_USING_CACHE #define RT_USING_HW_ATOMIC #define RT_USING_CPU_FFS -- Gitee From 5eb16da04be71d809b03871bc63c3c0cffd6f6cc Mon Sep 17 00:00:00 2001 From: windows Date: Wed, 22 Nov 2023 23:09:28 +0800 Subject: [PATCH 2/3] [update] Suitable to gtags. Signed-off-by: windows --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 558b09f1e4..87595dcd32 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,11 @@ ncscope.* #ctag files tags +#gtag files +GPATH +GRTAGS +GTAGS + .idea .vscode *.code-workspace -- Gitee From 54d46c00e6354383d8f1571ede7991e468cb9672 Mon Sep 17 00:00:00 2001 From: windows Date: Thu, 23 Nov 2023 01:36:18 +0800 Subject: [PATCH 3/3] [fix] A name in ctime.c same with musllib macro. ctime.c has defined struct timer_obj::sigev_notify_function who has a same name with musllib macro defined in signal.h:196. The field will be precompiled as a macro name!!! Version Musl GCC I used: https://musl.cc/arm-linux-musleabi-cross.tgz gcc version 11.2.1 20211120 (GCC) Signed-off-by: windows --- components/libc/compilers/common/ctime.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/libc/compilers/common/ctime.c b/components/libc/compilers/common/ctime.c index 44822ec379..ffa4d150a3 100644 --- a/components/libc/compilers/common/ctime.c +++ b/components/libc/compilers/common/ctime.c @@ -771,7 +771,7 @@ RTM_EXPORT(rt_timespec_to_tick); struct timer_obj { struct rt_ktime_hrtimer hrtimer; - void (*sigev_notify_function)(union sigval val); + void (*sigev_notify_function_t)(union sigval val); union sigval val; struct timespec interval; /* Reload value */ struct timespec value; /* Reload value */ @@ -874,7 +874,7 @@ static void rtthread_timer_wrapper(void *timerobj) } #ifdef RT_USING_SMART /* this field is named as tid in musl */ - int tid = *(int *)&timer->sigev_notify_function; + int tid = *(int *)&timer->sigev_notify_function_t; struct lwp_timer_event_param *data = rt_container_of(timer->work, struct lwp_timer_event_param, work); data->signo = timer->sigev_signo; @@ -892,9 +892,9 @@ static void rtthread_timer_wrapper(void *timerobj) if (rt_work_submit(timer->work, 0)) RT_ASSERT(0); #else - if(timer->sigev_notify_function != RT_NULL) + if(timer->sigev_notify_function_t != RT_NULL) { - (timer->sigev_notify_function)(timer->val); + (timer->sigev_notify_function_t)(timer->val); } #endif /* RT_USING_SMART */ } @@ -982,7 +982,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) timer->work = work; #endif /* RT_USING_SMART */ - timer->sigev_notify_function = evp->sigev_notify_function; + timer->sigev_notify_function_t = evp->sigev_notify_function; timer->val = evp->sigev_value; timer->interval.tv_sec = 0; timer->interval.tv_nsec = 0; -- Gitee