Framebuffer for 480*480 screen


What MCU/Processor/Board and compiler are you using?

Yocto, with arm processor (Renesas Board)

What LVGL version are you using?

version 9

What do you want to achieve?

To display a label through Frame Buffer

What have you tried so far?

Tried to create a framebufer through lv_linux_fbdev_create() and lv_linux_fbdev_set_file() ,
got the following error.

[Error] (3108423.513, +3108423513) lv_display_set_buffers: Asserted at expression: buf1 != NULL Null buffer lv_display.c:401
2020/09/23 04:45:49 521984

Code to reproduce

    void initialize()
        LOG_INFO("Initializing LVGL");
    static void displayInit()
        display = lv_linux_fbdev_create();
       lv_linux_fbdev_set_file(display, "/dev/fb0");


    void showLabel()
        lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MAIN);
        /*Create a white label, set its text and align it to the center*/
        lv_obj_t * label = lv_label_create(lv_screen_active());
        lv_label_set_text(label, "Hello world");
        lv_obj_set_style_text_color(lv_screen_active(), lv_color_hex(0xffffff), LV_PART_MAIN);
        lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

Screenshot and/or video

1 Like