Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 6 months ago.
Local File System not working
I am trying the local file system example I would expect to see a file called out.txt on my MBed. I don't get anything. Can someone help?
- include "mbed.h"
LocalFileSystem local("local"); Create the local filesystem under the name "local"
int main() { FILE *fp = fopen("/local/out.txt", "w"); Open "out.txt" on the local file system for writing
fprintf(fp, "Hello World!");
fclose(fp);
}
1 Answer
7 years, 6 months ago.
I very recently ran into the same issue and temporarily solved it my reverting my mbed-os back to the `mbed_lib_rev137` tag. There was an issue with the LocalFileSystem API recently, which has now apparently been solved here:
https://github.com/ARMmbed/mbed-os/pull/4087
I can confirm that switching to the mbed-os-5.5.0 tag for mbed-os also fixes the issue. mbed-os-5.5.0 was released just three hours ago! :)
However, I don't know your development setup so I can't be certain that you are facing the same issue I had.
Hope this helps.