LVGL Memory Allocation Issues on ESP32 with esp_lcd

anyone worked with LVGL in ESP IDF?
8 Replies
te0
te03mo ago
i am using the esp_lcd component, which works, but the MCU raises errors at the lv_display_t* myDisplay = lv_display_create(320,240);
te0
te03mo ago
i lowered down the LVGL memory to 10 KB
te0
te03mo ago
40811850: 0x0000000a 0x000000f0 0x4080e084 0x4200aff6 0x00000008 0x00000000 0x4080e084 0x4200bb86
0x4200aff6: lv_malloc_core at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/stdlib/builtin/lv_mem_core_builtin.c:144
0x4200bb86: lv_malloc at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/stdlib/lv_mem.c:72

40811870: 0x00000017 0xffffffff 0xffffffff 0x4200a728 0x00000000 0x000000f0 0x42039000 0x420087a4
0x4200a728: lv_ll_ins_head at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/misc/lv_ll.c:61
0x420087a4: lv_display_create at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/display/lv_display.c:64
40811850: 0x0000000a 0x000000f0 0x4080e084 0x4200aff6 0x00000008 0x00000000 0x4080e084 0x4200bb86
0x4200aff6: lv_malloc_core at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/stdlib/builtin/lv_mem_core_builtin.c:144
0x4200bb86: lv_malloc at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/stdlib/lv_mem.c:72

40811870: 0x00000017 0xffffffff 0xffffffff 0x4200a728 0x00000000 0x000000f0 0x42039000 0x420087a4
0x4200a728: lv_ll_ins_head at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/misc/lv_ll.c:61
0x420087a4: lv_display_create at C:/Users/Theo/Documents/esp_projects/lvgl_work/lvgl_esp_lcd/managed_components/lvgl__lvgl/src/display/lv_display.c:64
ZacckOsiemo
ZacckOsiemo3mo ago
Have you checked that you have enough memory to allocate that? Perhaps check usage with something like heap_caps_get_free_size to see how much is used. You can also consider enabling LV_USE_ASSERT_MEM in your lv_conf so you can discover what is actually happening with the memory
te0
te03mo ago
i have 400 KB available
Camila_99$$
Camila_99$$3mo ago
@te0 LVGL might be running into trouble with the 10KB limit you’ve set. You could try giving it a bit more memory to work with or optimize the buffer settings.
ZacckOsiemo
ZacckOsiemo3mo ago
ok thats odd would you be able to do the LVGl configuration to see what ces up?
te0
te03mo ago
im such a bastard, i forgot to do lv_init() in the beginning

Did you find this page helpful?