File system in zephyr flashed on Arduino 101
I am using zephyr RTOS on Arduino 101. Ihave flashed the file system code where in the data is written in a file using fs_write as mentioned in the sample code. The changes I made are :
The problem is that after executing the code the no. of free blocks reduced from 1700+ to 200 . Now I am not able to retrieve the blocks again even after deleting. Can anyone help
Thanks and Regards,
toggle quoted messageShow quoted text
Can anyone tell me where the file is stored I mean which part if the memory
On Mar 21, 2017 4:13 PM, "Anila Sri" <anilasri.y1995@...> wrote:
On Tue, Mar 21, 2017 at 21:28:41, Anila Sri wrote:
Can anyone tell me where the file is stored I mean which part if theNot clear where you made these changes. Are you referring to the
sample app function test_file_write()?
Not sure what is going on. Assuming the file system got corrupted,
you can try recreating it.
We currently do not have an external API/tool like "format" to recreate
the file system. There is a Jira story for that
For now you can make a temporary change in code to force recreation
of the file system.
In subsys/fs/fat_fs.c, in fs_init() function, comment out
res = f_mount(&fat_fs, "", 1);
and add a line
res = FR_NO_FILESYSTEM
This will force entry into the if condition block that calls f_mkfs() which
will recreate the file system at the next boot. After one reboot, you
can undo the above changes.