I've a problem with SD card writing.
The installation of SD card is ok, from esdhc to mfs over partition, as indicated in \mfs\examples\sdcard\demo.c, and I can write properly a file with the demo command "sd write".
But if I remove and then insert again the SD card, the "sd write" command gives me the answer "Error writing file...". With "sd dir" the file seems to be on the filesystem, but when I restart the device, that file is not there. I also tried to change cache mode with MFS_WRITE_THROUGH_CACHE, but the problem remains.
I saw similar topics about SD card writing, but no one can help me.
Maybe I need to reinstall filesystem again?
I did a quick check about this demo with Frdm-k64, I can see there is a "SD card uninstalled " info when you remove SD card and "Installing MFS over partition ..." when you reinsert SD card. So I can write successfully again.
For your issue, it seems that MFS not installed correctly before you write a file.