9 years, 3 months ago.

Identifier "LocalFileSystem" is undefined

Hi, all

I imported the LocalFileSystem program, but it has an error when compiling

LocalFileSystem

#include "mbed.h"

LocalFileSystem local("local"); 

int main() {

    FILE *fp = fopen("/local/test.txt", "w"); 
    fprintf(fp, "Hello file system!\n");
    fclose(fp);
}

The error : Error: Identifier "LocalFileSystem" is undefined in "main.cpp", Line: 3, Col: 2

Could you help to check the error? Thanks!

2 Answers

5 years, 6 months ago.

Hi

Sorry to open that conversation 4 years later , but a question that i have is , is there any alternativs to that on other cardboards such has stm32fxxx ?

Thanks !

Since I still got mails for this one: It depends on what you want from it. The USBFileSystem library does something quite similar if you pair it with an SD card, but I wouldn't call that one the most stable library, and definitely not maintained anymore.

If you don't need the USB access it becomes a lot easier. Just SDFileSystem is then probably the easiest solution to imlpement storage via FileSystem. If you don't need a FileSystem, but just want to store some variables, then I believe these days mbed has built-in options to use flash storage. For Kinetis/NXP devices there are also user libaries, from before mbed had the built-in option, which I think are still a bit more user friendly.

But the main question is: What do you need exactly?

posted by Erik - 14 Jun 2019
9 years, 3 months ago.

LocalFileSystem only works on the two original mbed boards (LPC1768 and LPC11u24).

How do we get this fixed in the documentation, or a more informative compiler error?

In other words who so we talk to, to have the documentation say near the top "NOTE: This is only known to work with the following boards: ..."

And then during compilation, have "LocalFileSystem.h" kick out a similar error message if it was determined the class should not be defined.

posted by Jason Daniels 23 May 2016