f1c100s+rtt+lvgl8.0出现了诡异的问题,之前用lv6.1的时候一切正常,然后因为要用到旋转功能,就用了8.0,结果发现一个诡异的问题
static void thrd_LVGL_Loop(void *parameter)
{
while (1)
{
//rt_kprintf("thrd_LVGL_Loop1\n");
lv_task_handler();
rt_thread_delay(10);
//rt_kprintf("AutoIncData=%d\n", AutoIncData);
}
}
在rtt任务中,只要调用rt_thread_delay(x)就会出错,把tr_thread_delay注释掉就一切正常,报错的串口输出如下
\ | /
- RT - Thread Operating System
/ | \ 4.0.1 build Nov 21 2021
2006 - 2019 Copyright by rt-thread team
[SFUD] Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD] gd25qxx flash device is initialize success.
Start...
PERIPH_get_pll_clk:600M
CPU_get_clk:704M
AHB_get_clk:2
00M
APB_get_clk:100M
[Thread]GUIThread Created.
msh />Execption:
r00:0x00000000 r01:0x18e0ffe0 r02:0x11810858 r03:0x00000000
r04:0x8007071c r05:0x00000000 r06:0x00000003 r07:0x8080135c
r08:0x00000004 r09:0xffffffff r10:0x00000000
fp :0x00000004 ip :0x8007071c
sp :0x80000594 lr :0x80160204 pc :0x80160204
cpsr:0x20000013
undefined instruction
thread - GUI_Lvgl stack:
thread pri status sp stack size max used left tick error
-------- --- ------- ---------- ---------- ------ ---------- ---
GUI_Lvgl 8 running 0x00000084 0x00000800 62% 0x0000000d 000
tshell 20 init 0x00000134 0x00001000 07% 0x0000000a 000
mmcsd_de 22 suspend 0x000000c8 0x00000800 09% 0x00000014 000
tidle0 31 ready 0x00000050 0x00000100 43% 0x00000016 000
shu
请问这个是哪里有问题啊
离线
创建任务代码如下
rt_thread_t tid;
tid = rt_thread_create("GUI_Lvgl", thrd_LVGL_Loop, RT_NULL, RT_LVGLLOOP_THREAD_STACK_SIZE, 8, 20);
RT_ASSERT(tid != RT_NULL);
rt_thread_startup(tid);
rt_kprintf("[Thread]GUIThread Created.\n");
离线
这种看上去就是任务堆栈设置小了
离线
设置到原来的10倍也还是不行,最后没办法试了下lvgl7.11,居然可以用了,先用了再说,
离线
会不会缓冲区没对齐
离线
解决了没有,我把LVGL编译好,发现同样的问题,关键以前没有弄过UI这方面的事情,对LVGL不了解,苦!
离线
应该是给lvgl分配的内存太小了吧
离线
这问题我也遇到了,我把lvgl的线程修改优先级为比main低就正常了,main优先级默认是10 我测试用的8.3 dev,你改大试试看看
离线