Is there a flash-based FS in rtems?
Robert S. Grimes
rsg at alum.mit.edu
Thu Oct 23 14:18:41 UTC 2008
Ed Sutter wrote:
> MicroMonitor has a simple NOR flash file system for managing updates etc...
> It hooks together with RTEMS pretty nicely. It's not designed for heavy
> file activity (no wear leveling), but does provide a nice platform
> to support system updates etc...
> Obviously, this would mean a bootloader change.
Let me add a bit here, as I am using MicroMonitor as my bootloader, and
I can vouch for its utility with application updates, etc. It also
gives you scripting abilities for miscellaneous startup activities, such
as running separate power-up tests before application startup, etc.
If you need to access files on the MicroMonitor file system from your
application (keeping Ed's caveat in mind, of course), you have two
choices. The obvious approach is to call back into MicroMonitor, as
documented in its User Manual; this would allow you the usual file
operations (eg. read, write, etc.). I haven't used this approach, so I
can't comment on it, but it seems certainly the way to go if you wish to
If you only need to read from files, for example, configuration files,
etc., another (simpler?) option is not to use MicroMonitor at all from
your application. This is made feasible because the file structure is
extremely simple, with files being a single, contiguous region of memory
_within the processor's address space_. Hence, you can simple set a
pointer to the beginning of the file and treat it as a regular,
in-memory data structure! (Note: these comments apply only to RAM and
XOR Flash disks.) An exercise for the reader is determining the start
location (and optionally, the size of the file) - of course, I can tell
you how I did it if you are interested...
More information about the users