What MCU/Processor/Board and compiler are you using?
STM32 on custom HW
What LVGL version are you using?
What do you want to achieve?
I have an image object that I’m creating dynamically. In other words, during runtime, data is sent to the MCU running LVGL, which populates the image pixel array (lv_img_dsc_t.data). Every other image object I have is static, i.e., defined at compile time. Those images all work. However, my dynamically created image does not work - nothing is shown on my display (hence all pixels are zeroes).
The only thing I need to do differently from the static image objects is make the pixel array and the lv_img_dsc_t not a ‘const’. This is obvious, as it can’t be a ‘const’. Therefore, I can’t use the LV_IMG_DECLARE macro; instead I declare the variable similarly, just not a const.
Both the pixel array and the lv_img_dsc_t are global variables; they’re not on the stack. I can confirm the pixel array is correct by the time lv_img_set_src is called.
So can LVGL not display an image array that isn’t const? Any ideas where to look in the LGVL code?