I'm using the FileSystemUtils.cpp file from the EFFS-HTTP application with the changes needed to the Init from the MultipleMMC example (I wish the FileSystemUtils files were identical across all the examples so we could just treat them like a lib).
In the task (MAIN) I have initialized the file system in I'm able to access it and read/write with no issues. However when trying to access it from other tasks it doesn't work.
I have been careful at the top of UserMain() to call f_enterFS() for the various tasks prios.
Code: Select all
f_enterFS();
OSChangePrio(MAIN_PRIO);
f_enterFS();
OSChangePrio( HTTP_PRIO );
f_enterFS();
OSChangePrio( TASK_PRIORITY_RDMNET_MAIN );
f_enterFS();
OSChangePrio(MAIN_PRIO);
/*** Initialize Netburner Hardware ***/
InitializeHardware(); /* I init the file system and do some read/write in here and it works fine.*/
//Get an IP Address.....
InitializeEthernet();
//OSChangePrio(MAIN_PRIO);
iprintf("EnableAutoUpdate\n");
EnableAutoUpdate();
StartHTTP();
EnableTaskMonitor();
DisplayEffsSpaceStats(); // Display file space usage
DumpDir(); // Display flash card files and directories
In main both of those work. However when I try calling from either the result of a submit action on a web form or just inside the top of another task the DumpDir() fails and if I try creating or checking for existence of a folder it fails too. The DisplayEffsSpaceStats() always works though.
So I'm a bit baffled here. I've tried following the instructions and examples closely about not doing anything with the file system calls until f_enterfs() has been called for all task priorities it will be used in (shown above).
Does it work properly if the tasks have not actually been started yet? I assume it does since that's what it looked like for the examples...
Anything else I'm missing here?
Thanks.
Scott