日志如下:
CPU Exception: NO.7
x1: 40026450 x2: 30081610 x3: 30048620 x4: deadbeef
x5: deadbeef x6: 00000000 x7: deadbeef x8: 30075bb4
x9: 80006088 x10: 80006080 x11: 3004bb14 x12: 00000003
x13: 00000002 x14: 80100400 x15: 80100400 x16: 30081724
x17: 00000000 x18: 300811ec x19: 30049e38 x20: 30049d38
x21: 30049d28 x22: 30075bd0 x23: 00000000 x24: deadbeef
x25: deadbeef x26: deadbeef x27: deadbeef x28: deadbeef
x29: deadbeef x30: deadbeef x31: deadbeef
mcause : 30000007
mtval : 00000000
mepc : 400002e6
mstatus: 80007800
离线
您好,有更加详细的信息吗,是在什么环境情况下发生的
我使用SD卡存放ttf字库,写了一个非常简单的测试demo,代码如下:
void user_ttf_init(void)
{
static lv_ft_info_t info;
rt_kprintf("=================> user_ttf_init\n");
//rt_thread_mdelay(5000);
/*FreeType uses C standard file system, so no driver letter is required.*/
//info.name = "/rodata/font.ttf";
info.name = "/sdcard/font/font.ttf";
info.weight = 64;
info.style = FT_FONT_STYLE_NORMAL;
info.mem = NULL;
if (!lv_ft_font_init(&info))
{
rt_kprintf("font create failed.\n");
return;
}
else
{
rt_kprintf("font create success.\n");
}
/*Create style with the new font*/
static lv_style_t style;
lv_style_init(&style);
lv_style_set_text_font(&style, info.font);
lv_style_set_text_align(&style, LV_TEXT_ALIGN_CENTER);
/*Create a label with the new style*/
lv_obj_t *label = lv_label_create(lv_scr_act());
lv_obj_add_style(label, &style, 0);
lv_label_set_text(label, "你好啊");
lv_obj_center(label);
}
// INIT_APP_EXPORT(user_ttf_init);
MSH_CMD_EXPORT(user_ttf_init, test free type);
使用串口命令运行user_ttf_init,结果打印如下日志:
=================> user_ttf_init
font create success.
[Error] (16.537, +16039) get_glyph_dsc_cb_cache: ImageCache_Lookup error (in lv_freetype.c line #307)
[Error] (16.588, +51) _lv_inv_area: detected modifying dirty areas in render (in lv_refr.c line #217)
[Error] (16.598, +10) _lv_inv_area: detected modifying dirty areas in render (in lv_refr.c line #217)
[Error] (16.607, +9) _lv_inv_area: detected modifying dirty areas in render (in lv_refr.c line #217)
[Error] (16.634, +27) get_glyph_dsc_cb_cache: ImageCache_Lookup error (in lv_freetype.c line [Error] (16.658, in lv_freetype.c line #307)
CPU Exception: NO.4
x1: 400c553a x2: 3004e6c0 x3: 300423bc x4: deadbeef
x5: 400024b8 x6: 0000003b x7: 300900a0 x8: 3004e760
x9: 00004f60 x10: 00000032 x11: 3004e708 x12: 3004e6f4
x13: 0000597d x14: 00000003 x15: 00000001 x16: 00000080
x17: 0000003b x18: 3004f8a4 x19: 3004f8b8 x20: 0000597d
x21: 3004f8b8 x22: 00000000 x23: 00000000 x24: 00000001
x25: 00000023 x26: 00004f60 x27: 00000020 x28: 00000039
x29: 000032a8 x30: 00000000 x31: 30079f10
mcause : 38000004
mtval : 000000be
mepc : 400564fe
mstatus: 80007880
重要的是要掌握解决此类问题的方法,如果能有一个类似《ESP8266重启原因以及常见Fatal Exceptionܻ原因》的文档,那就非常棒了,麻烦大佬帮忙指点一下,谢谢!
离线
目前来说比较好的手段是连接jtag调试器来调试,不然真不好找CPU异常出处。除非异常发生于系统启动阶段,此时可以打log调试。
建议官方将CmBacktrace移植到RISC-V,方便追踪程序崩溃位置。
我之前习惯用串口日志定位问题,大佬的方法的确是个不错的选择,我学习一下怎么用jtag仿真,感谢指点
离线
不用硬件调试器行不行啊?
像linux那样,可以通过usb或网口进行gdb调试就好了。
基础太差了,还不了解这方法,我学习一下,谢谢大佬提供思路
离线
您好,有更加详细的信息吗,是在什么环境情况下发生的
奇怪的是,字库放在SPI FLASH里面就可以正常显示,放到SD卡就出问题了
离线
我把矢量字体的weight改为72,出现tshell stack overflow,然后我把tshell的任务堆栈给大一点,现在又出现LVGL stack overflow,一环扣一环,头大
离线
胆子放大一点,把tshell和LVGL任务堆栈都调到40960,显示正常了,但是显示速度有点慢,有什么办法提速吗,矢量字库是放在TF卡的
最近编辑记录 hzqlz (2024-10-16 16:55:20)
离线