What MCU/Processor/Board and compiler are you using?
ESP32, Arduino IDE, 320x240px display.
What LVGL version are you using?
LVGL 8.3
Description
I am trying to display a GIF, started out with the provide example from LVGL.
That works fine. Went on with my own, converted that with the GIF decoder from LVGL, didn’t work.
Tried the bulb.gif example (through the decoder) and that worked fine.
After many many hours of trying and using many different online gifs, I discovered that any gif larger than 120px height (and 160px width, not 100% sure about this) won’t be displayed.
It compiles without any errors, but the screen remains black.
Tried the GIF as background on a blank screen as well as within an Image object.
Any thoughts on the matter would be highly appreciated.
Thank you.
Thank you for your reply @robotanical, I was thinking in that direction as well.
But wouldn’t the compiler than throw an error and not compile?
According to the compiler I am only using 24% of the programming memory and 19% of the dynamic memory.
On esp32 you can check with esp_get_free_heap_size() how much memory you have left, not sure if compiler will tell you dynamically during runtime how much you have left?
@robotanical Any other suggestions or thoughts on the matter maybe?
Cause after testing multiple dimensions and different GIFs it doesn’t seem to be a RAM issue. Since I get similar values from esp_get_free_heap_size(), for displaying and non displaying GIF (dimensions).
After starting over code wise with bare minimal code, without any other items/widgets/images, the problem persists.
Tried it in steps of 20px width, 320x240 (as needed), 300x225, 280x210, etc etc etc.
The GIF(s) only display from 180x135 and lower.
Even with GIFs that larger by size but smaller in memory than the example GIF (bulb) it doesn’t work.
Any tip towards what direction I should look for a solution would be appreciated.
Changing #define LV_MEM_CUSTOM 1 #if LV_MEM_CUSTOM == 0 /*Size of the memory available for lv_mem_alloc() in bytes (>= 2kB)*/ #define LV_MEM_SIZE (48U * 1024U) /*[bytes]*/
To #define LV_MEM_CUSTOM 0 #if LV_MEM_CUSTOM == 0 /*Size of the memory available for lv_mem_alloc() in bytes (>= 2kB)*/ #define LV_MEM_SIZE (96U * 1024U) /*[bytes]*/
gives compiling errors, even with bare minimal code without GIF.
.dram0.bss' will not fit in region dram0_0_seg’
DRAM segment data does not fit.
DRAM segment data does not fit.
region `dram0_0_seg’ overflowed by 13776 bytes
Any suggestion what’s going wrong here, cause the code is basically empty.
Put Arduino IDE to Trash and use more profi IDE and read docu lvgl gif page. Here is memory requirments defined.
And bare minimal code is irelevant, you can assign full RAM with one line code…