您尚未登录。

#1 Re: 工业芯 匠芯创 » 在首页和2页来回滑动切换时界面卡死(D21x luban SDK LVGL UI示例配置 思源矢量汉字库后) » 2024-06-28 23:00:26

乘风 说:
乘风 说:

@80802680
我们这边用你的字体测试,没有发现卡死现象,请问你如果直接用base_demo的原始字体,是否会出现这种情况。

make freetype-distclean 一下,然后再重新编译一下,试试这个是否可以解决


哦,刚用更新了SDK包,用最新的SDK包,编译后运行正常了,

以前没有更新,用的是1月左右的SDK包有这个BUG。

#2 Re: 工业芯 匠芯创 » 在首页和2页来回滑动切换时界面卡死(D21x luban SDK LVGL UI示例配置 思源矢量汉字库后) » 2024-06-27 20:51:59

regbbs 说:

@80802680

LPKG_LVGL_THREAD_STACK_SIZE 这里的stack加大一点试试。
我测试的时候也出现卡死问题,修改了stack

LPKG_LVGL_THREAD_STACK_SIZE?

找遍了都没找到这个名称

#3 Re: 工业芯 匠芯创 » 在首页和2页来回滑动切换时界面卡死(D21x luban SDK LVGL UI示例配置 思源矢量汉字库后) » 2024-06-25 22:02:03

乘风 说:

请发一下你的字库,还有代码的改动点,我们这边测试一下。


1. make menuconfig,进入 menuconfig

	ArtInChip Luban SDK Configuration  --->
    Third-party packages  --->
    freetype  --->选择但取消二进制预编译

2.在lv_conf.h头文件中打开宏定义

	#define   LV_USE_FREETYPE 1
	#define   LV_BUILD_EXAMPLES 1

3.修改main.c中的入口函数:

   /*Create a Demo*/
    void base_ui_init();
    base_ui_init();

4.复制TTF字体到lvgl-ui/base_ui/asserts/font目录下

5. 修改lvgl-ui\base_ui\base_ui.c

void base_ui_init()
{
    FAKE_IMAGE_INIT(bg_dark, 1024, 600, 0, 0x00000000);

    img_bg = lv_img_create(lv_scr_act());
    lv_img_set_src(img_bg, LVGL_PATH(global_bg.png));
    lv_obj_set_pos(img_bg, 0, 0);


    /*Create a font*/
    static lv_ft_info_t info;
    /*FreeType uses C standard file system, so no driver letter is required.*/
    info.name = "/usr/local/share/lvgl_data/font/GenJyuuGothic-Light-2.ttf";
    info.weight = 48;
    info.style = FT_FONT_STYLE_NORMAL;
    info.mem = NULL;
    if(!lv_ft_font_init(&info)) {
        LV_LOG_ERROR("create failed.");
    }


    /*Create style*/
    static lv_style_t font_style;
    lv_style_init(&font_style);
    lv_style_set_text_font(&font_style, info.font);


    main_title = lv_label_create(img_bg);
    lv_obj_set_width(main_title, LV_SIZE_CONTENT);
    lv_obj_set_height(main_title, LV_SIZE_CONTENT);
    lv_obj_align(main_title, LV_ALIGN_TOP_MID, 0, 0);
    lv_obj_set_pos(main_title, 0, 10);
    lv_obj_add_style( main_title, &font_style, 0 );
    lv_label_set_text(main_title, "Meter");
    lv_obj_set_style_text_color(main_title, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(main_title, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
	
	

    bg_fps = lv_label_create(img_bg);
    lv_obj_set_width(bg_fps, LV_SIZE_CONTENT);
    lv_obj_set_height(bg_fps, LV_SIZE_CONTENT);
    lv_obj_align(bg_fps, LV_ALIGN_TOP_RIGHT, 0, 0);
    lv_obj_set_pos(bg_fps, -130, 50);
    lv_label_set_text(bg_fps, "");
    lv_obj_set_style_text_color(bg_fps, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(bg_fps, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(bg_fps, &ui_font_Title, LV_PART_MAIN | LV_STATE_DEFAULT);


    bg_logo = lv_label_create(img_bg);
    lv_obj_set_width(bg_logo, LV_SIZE_CONTENT);
    lv_obj_set_height(bg_logo, LV_SIZE_CONTENT);
    lv_obj_align(bg_logo, LV_ALIGN_BOTTOM_RIGHT, 0, 0);
    lv_obj_set_pos(bg_logo, -30, -30);
    lv_obj_add_style( bg_logo, &font_style, 0 );
    lv_label_set_text(bg_logo, "矢量字");
    lv_obj_set_style_text_color(bg_logo, lv_color_hex(0x00FFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(bg_logo, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

其它的都不变



字体文件GenJyuuGothic-Light-2.rar

#4 工业芯 匠芯创 » 在首页和2页来回滑动切换时界面卡死(D21x luban SDK LVGL UI示例配置 思源矢量汉字库后) » 2024-06-25 00:47:07

80802680
回复: 8

D21x luban SDK LVGL UI示例配置 思源矢量汉字库后,在首页和2页来回滑动切换时界面卡死

是怎么回事??
IMG_20240625_002544.jpgIMG_20240625_003229.jpg

#5 工业芯 匠芯创 » D21x luban SDK LVGL UI示例怎么设置 支持显示中文字符 » 2024-06-23 10:00:15

80802680
回复: 0

D21x linux SDK包LVGL UI示例怎么设置 支持显示中文字符

选择freetype包,编译打包提示错误

Scanning dependencies of target test_lvgl
[ 97%] Building C object CMakeFiles/test_lvgl.dir/base_ui/base_ui.c.o
[ 97%] Building C object CMakeFiles/test_lvgl.dir/base_ui/cpu_mem.c.o
[ 98%] Building C object CMakeFiles/test_lvgl.dir/base_ui/font/ui_font_H1.c.o
[ 98%] Building C object CMakeFiles/test_lvgl.dir/base_ui/font/ui_font_Title.c.o
[ 98%] Building C object CMakeFiles/test_lvgl.dir/base_ui/font/ui_font_Big.c.o
[ 98%] Building C object CMakeFiles/test_lvgl.dir/main.c.o
[ 98%] Building C object CMakeFiles/test_lvgl.dir/lv_drivers/aic_dec.c.o
[ 99%] Building C object CMakeFiles/test_lvgl.dir/lv_drivers/lv_fbdev.c.o
[ 99%] Building C object CMakeFiles/test_lvgl.dir/lv_drivers/lv_ge2d.c.o
[ 99%] Building C object CMakeFiles/test_lvgl.dir/lv_drivers/lv_port_indev.c.o
[ 99%] Building C object CMakeFiles/test_lvgl.dir/lv_drivers/lv_port_disp.c.o
[100%] Linking C executable test_lvgl
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: warning: libpng16.so.16, needed by /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so, not found (try using -rpath or -rpath-link)
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_expand_gray_1_2_4_to_8@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_read_end@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_get_error_ptr@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_gray_to_rgb@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_read_info@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_destroy_read_struct@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_read_user_transform_fn@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_read_image@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_create_read_struct@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_get_IHDR@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_read_update_info@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_longjmp_fn@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_get_valid@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_read_fn@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_create_info_struct@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_tRNS_to_alpha@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_interlace_handling@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_error@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_filler@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_get_io_ptr@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_packing@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_palette_to_rgb@PNG16_0'
/home/mcgs/d211-master/output/d211_demo128_nand/host/opt/ext-toolchain/bin/../lib/gcc/riscv64-unknown-linux-gnu/10.4.0/../../../../riscv64-unknown-linux-gnu/bin/ld: /home/mcgs/d211-master/output/d211_demo128_nand/host/riscv64-linux-gnu/sysroot/usr/lib64xthead/lp64d/libfreetype.so: undefined reference to `png_set_strip_16@PNG16_0'
collect2: error: ld returned 1 exit status
CMakeFiles/test_lvgl.dir/build.make:241: recipe for target 'test_lvgl' failed
make[4]: *** [test_lvgl] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/test_lvgl.dir/all' failed
make[3]: *** [CMakeFiles/test_lvgl.dir/all] Error 2
Makefile:132: recipe for target 'all' failed
make[2]: *** [all] Error 2
package/utils/pkg-generic.mk:398: recipe for target '/home/mcgs/d211-master/output/d211_demo128_nand/build/lvgl-ui/.stamp_built' failed
make[1]: *** [/home/mcgs/d211-master/output/d211_demo128_nand/build/lvgl-ui/.stamp_built] Error 2
Makefile:73: recipe for target '_all' failed
make: *** [_all] Error 2

#6 工业芯 匠芯创 » D21x luban SDK工程,怎么启用QT5库才能编译通过QT5应用APP » 2024-06-22 12:51:44

80802680
回复: 0

D21x linux SDK工程,原SDK包也带了QT5库,默认是QT4.8.7库, 怎么启用QT5库才能编译通过QT5应用APP

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn