My device is a WT32-SC01 Plus and I wanted to use LVGL with ESP-IDF (no Arduino Core) to show images, which I downloaded from my server. So the images aren’t as C files. The files should be stored in flash within the spiffs partition.
My code is as following
static auto *image = lv_image_create(lv_scr_act());
lv_image_set_src(image, "S:image.png");
lv_obj_align(image, LV_ALIGN_TOP_LEFT, 0, 0);
I used the lv_conf.h for the setup
#define LV_USE_FS_POSIX 1
#if LV_USE_FS_POSIX
#define LV_FS_POSIX_LETTER 'S'
#define LV_FS_POSIX_PATH ""
#define LV_FS_POSIX_CACHE_SIZE 0
#endif
To test my setup, I created an image and bundled it within the binary
spiffs_create_partition_image(storage ../storage FLASH_IN_PROJECT)
But I always see in the log an error message
W (1695) LVGL: [Warn] lv_image_set_src: failed to get image info: S:image.png lv_image.c:189
Now I’m not sure, if my file is in the storage.bin or if lvgl just has an failure while reading.