LittleFS doesn't read from image #nvs


Daniel O <dsoliveira@...>
 
Edited

Hi there,

**************************

Update (7/7/21):

For some reason, I can't read the file unless I create a second one. After that I can read the first file but not the second file and so on. The new file could be empty.

*****************************

I created an image on Ubuntu as described in Littlefs-fuse, with a simple TXT file just for testing and flashed it image at the correct uC's memory address.
If I create a new file in runtime, I can write and read the content easily. However, for some reason, I cannot read the TXT file content.
The function fs_open(&file, fname_txt, FS_O_READ); returns 0, which means it found the file, but the fs_read(&file, &buffer, sizeof(buffer)); returns 0 and the buffer array is empty.

I guess it could be some image's configuration, but I can't figure it out. 
Someone have experience something similar?

 

Thank you

Join devel@lists.zephyrproject.org to automatically receive all group messages.