Re: File system in zephyr flashed on Arduino 101
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.