Has anyone successfully been able to store and retrieve data from the Nano RP2040's built in flash storage? I have attempted to use the LittleFS_Mbed_RP2040 module to read/write to it, but every time I attempt to init() the LittleFS_MBED file system it give an error: "[LFS] LittleFS Mount Fail". It then sits on "[LFS] Formatting... " forever.
I just have a very small amount of data I would like to store that I would normally use the EEPROM for, but obviously I can't since the Nano RP2040 Connect does not have an EEPROM.
Any advice is appreciated...
Here is the snip-it of code:
#include <LittleFS_Mbed_RP2040.h>
LittleFS_MBED *myFS;
void setup() {
myFS = new LittleFS_MBED();
myFS->init();
file = String(MBED_LITTLEFS_FILE_PREFIX) + "/savedfile";
FILE *fout = fopen(file.c_str(), "w");
String s = "This is some text to get stored";
fwrite(s.c_str(), 1, sizeof(s), fout);
fclose(fout);
}
void loop() {
}