I'm currently using version MQX 3.7, with the latest MFS and i had a quick question. I'm programming for an industrial instrument that has several tasks that open a file and write to the file system.
My question is, Is there a way to close all of these possible open files from just one task and unmount the file system? I need to be able to have a user walk up to the instrument hit an unmount button, and take out the drive. I could do this with the last two file systems I used, but I don't see a provision in the MQX MFS to do that, maybe I’m just overlooking it?
Solved! Go to Solution.
Hello,
MFS simply refuses to be closed and unmounted when there are still some opened files.
I'm suggesting to write some kind of simple file manager, that will open the files for you, store the handles and flush/close them all upon some special event.
Regards,
PetrM
Hello,
MFS simply refuses to be closed and unmounted when there are still some opened files.
I'm suggesting to write some kind of simple file manager, that will open the files for you, store the handles and flush/close them all upon some special event.
Regards,
PetrM
Thank you for your replay PetrM.
I just wanted to give you an update. I have decided to go with another USB stack. I went this direction becuase I don't feel that the USB stack as it stands (MQX 3.7) is reliable enough to put in an industrial instrument. I found that even if your run the MQX->MFS drive demo that you can lock it up by inserting and removing the drive multiple times (even after taking a bug out that tries to print a null pointer found in the demo).
Thanks for your help though, if I felt MFS was robust enough your solution would have been my next step.