Memory dump after lv_port_disp_init

LVGL is v-8.0.0


The code block(s) should be between ```c and ``` tags:

void lv_port_disp_init(void)
     * Create a buffer for drawing

     * LVGL requires a buffer where it internally draws the widgets.
     * Later this buffer will passed to your display driver's `flush_cb` to copy its content to your display.
     * The buffer has to be greater than 1 display row
     * There are 3 buffering configurations:
     * 1. Create ONE buffer:
     *      LVGL will draw the display's content here and writes it to your display
     * 2. Create TWO buffer:
     *      LVGL will draw the display's content to a buffer and writes it your display.
     *      You should use DMA to write the buffer's content to the display.
     *      It will enable LVGL to draw the next part of the screen to the other buffer while
     *      the data is being sent form the first buffer. It makes rendering and flushing parallel.
     * 3. Double buffering
     *      Set 2 screens sized buffers and set disp_drv.full_refresh = 1.
     *      This way LVGL will always provide the whole rendered screen in `flush_cb`
     *      and you only need to change the frame buffer's address.

    static lv_disp_draw_buf_t disp_buf;
    static lv_color_t buf_1[LV_HOR_RES_MAX * 10];                          /*A buffer for 10 rows*/
    lv_disp_draw_buf_init(&disp_buf, buf_1, NULL, LV_HOR_RES_MAX * 10);   /*Initialize the display buffer*/

    lv_disp_drv_t disp_drv;               /*Descriptor of a display driver*/
    lv_disp_drv_init(&disp_drv);          /*Basic initialization*/

    /*Set the resolution of the display*/
    disp_drv.hor_res = LV_HOR_RES_MAX;
    disp_drv.ver_res = LV_VER_RES_MAX;

    disp_drv.flush_cb = lv_disp_drv_flush_simple_cb;    /*Set your driver function*/
    disp_drv.draw_buf = &disp_buf;          /*Assign the buffer to the display*/

    /* Fill a memory array with a color if you have GPU.
     * Note that, in lv_conf.h you can enable GPUs that has built-in support in LVGL.
     * But if you have a different GPU you can use with this callback.*/
    //disp_drv.gpu_fill_cb = gpu_fill;

    /*Finally register the driver*/

* @brief ivgl相关初时化
static void lvgl_config_init(void)

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

COM9_2021-06-30_19-49-58.log_ARM.txt (65.2 KB)

In my project, the program dump before the disp_drv flush_cb run.
the lv_tick_inc(5) and lv_task_handler() also called in 5ms in a timer handler in my project.
so I just want to know what wrong in my project.


disp_drv needs to be static (or allocated on the heap). Right now it goes out of scope as soon as lv_port_disp_init returns.

(The same change needs to be applied to your lv_indev_drv_t structure, if you have one.)

Thanks! My brother.