Hi, everyone.
I’m developing based on zephyr RTOS using STM32F429i board.
I was working on LVGL 7.6.1 and tried to load .bin (convert png to bin) from flash memory.
also I used littlefs filesystem.
it was simple code.
- lv_obj_t* img = lv_img_create(lv_scr_act(), NULL );
lv_img_set_src( img, “S:/lfs/img/left.bin” );
lv_obj_align( img, NULL, LV_ALIGN_CENTER, 0, 0);
and also I pushed left.bin to “/lfs/img” like below
however, the image isn’t shown. so I checked in detail.
when I try to open the image file, I found return value is EBUSY.
so I check the source code. and finally I found the problem code.
I’m not sure but call flow is like below;
- lv_fs_open() : lv_img_decoder_built_in_info
- fs_open() : lvgl_fs_open()
- return EBUSY in fs_open()
checked in detail in lv_fs_open()
when allocating in file_p->file_d variable, I think memory initialize is needed. so I add _lv_memset() function. sizeof(struct fs_file_t) is 12. after that, image is shown and there is no EBUSY error.
I think there was garbage value in file_p->file_d. so zfp->mp is not NULL ( return EBUSY value )
is there anything I missed?
please let me know.
Thanks