Description
I want to use a binary image file from the converter and display it using lvgl from a littlefs mount.
What MCU/Processor/Board and compiler are you using?
Zephyr, nRF5340, nRF Connect for VSC
What LVGL version are you using?
8.3
What have you tried so far?
I have read this documentation on File System and LittleFS and tried with lv_fs_littlefs_set_driver(LV_FS_LITTLEFS_LETTER, my_lfs)
but these calls are not recognized.
I’ve searched the forum and seen a few references but no answers.
Code to reproduce
The code block(s) should be formatted like:
/*From file*/
lv_img_set_src(screen_icon, "/lfs/my_icon.bin");
Here is the error I’m getting:
[00:00:00.299,957] <wrn> lvgl: (0.299, +299) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
[00:00:00.300,140] <wrn> lvgl: (0.299, +0) lv_draw_img: Image draw error (in lv_draw_img.c line #83)
[00:00:00.312,225] <wrn> lvgl: (0.312, +13) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
[00:00:00.312,377] <wrn> lvgl: (0.312, +0) lv_draw_img: Image draw error (in lv_draw_img.c line #83)
[00:00:00.324,676] <wrn> lvgl: (0.324, +12) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
[00:00:00.324,829] <wrn> lvgl: (0.324, +0) lv_draw_img: Image draw error (in lv_draw_img.c line #83)
[00:00:00.336,547] <wrn> lvgl: (0.336, +12) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
[00:00:00.336,700] <wrn> lvgl: (0.336, +0) lv_draw_img: Image draw error (in lv_draw_img.c line #83)
[00:00:00.348,419] <wrn> lvgl: (0.348, +12) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
[00:00:00.348,602] <wrn> lvgl: (0.348, +0) lv_draw_img: Image draw error (in lv_draw_img.c line #83)
[00:00:00.360,321] <wrn> lvgl: (0.360, +12) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
[00:00:00.360,473] <wrn> lvgl: (0.360, +0) lv_draw_img: Image draw error (in lv_draw_img.c line #83)
I’ve tried these two calls but they are not recognized and neither is the LV_FS_LITTLEFS_LETTER
:
lv_fs_littlefs_set_driver(LV_FS_LITTLEFS_LETTER, mp); // Attach 'my_lfs' to driver letter 'S'
lv_fs_littlefs_set_driver('S', mp); // Attach 'my_lfs' to driver letter 'S'
When I try with this:
lv_img_set_src(screen_token_icon, "S:/lfs/my_icon.bin");
I get this error:
<wrn> lvgl: (0.255, +255) lv_fs_open: Can't open file (S:/lfs/my_icon.bin): unknown driver letter (in lv_fs.c line #68)
When debugging it this call:
lv_img_set_src(screen_icon, "/lfs/my_icon.bin");
Does it find the file in fs and if so, does it accept the header when read from flash?
I am getting this errror
[00:01:05.635,284] <wrn> lvgl: (65.635, +65298) _lv_img_cache_open: Image draw cannot open the image resource (in lv_img_cache.c line #125)
I am getting to here:
I’m running into this:
Getting called from here: