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, 5 months ago.
mdot compilation error with "LocalFileSystem_HelloWorld - main.cpp" example
I'm used mdot platform. The example send my this compilation error:
What is the problem? thanks you
1 Answer
7 years, 5 months ago.
The mdot is not using the LocalFileSystem APIs, but rather has it's own. See the header here. The functions are called saveUserFile / readUserFile / etc.
F.e.:
// write a file const char text[] = "Hello world"; bool res = dot->saveUserFile("test.txt", (void*)text, sizeof(text)); printf("Saved file. Success=%d\n", res); // read a file char buffer[128] = { 0 }; dot->readUserFile("test.txt", buffer, sizeof(buffer)); buffer[127] = 0; // make sure to 0 terminate the returning string printf("Read back. Text is %s\n", buffer);