This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

flash and ram file i/o


On previous embedded systems I've developed I've used newlib and grafted in
to it the capability to perform simple file i/o to ram and flash files
where,

    + all the files have a fixed max. size. Files are tagged as type BINARY
or ASCII.
    + all space for the files is preallocated - using arrays for ram files
and specifying fixed address ranges for flash files.
    + on open()'ing binary files are assumed to occupy their entire address
range. Ascii files have a calculated end pointer, determined during the
open() to be the first non-ascii character in the file.

This allowed me simple fopen(), fread(), fwrite(), fclose(), etc. support
for ram and flash files in my application code, and allowed ascii error logs
and machine statistics, etc., as well as new binary application code, to be
written to flash.

I'm wondering how I can provide similar functionality (or better) using
ECOS.

Clearly I can use ramfs for the ram file system support.
The ability to dynamically allocate space per file based on run time
requirements will be an advantage over my previous, much simpler scheme.

But what about flash file suport? JFFS2 seems overcomplicated for what I
want (and potentially processor intensive if it's compressing stuff as well
- correct?).

What I think I want is a flashfs based on something like romfs but with
write accesses permitted on the flash files, and with fixed (maximum) file
sizes for the flash files, and some means of tagging whether they're binary
or ASCII files. I don't need to be able to dynamically create new flash
files.

Does this seem sensible?

How do others support application code writing to flash files? Is JFFS2 the
only the way to go? How stable/cpu intensive is JFFS2 in the current ECOS
implementation?

Any pointers greatefully received.


cheers,


Ian

----------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE

This message and any attachment is confidential and is protected by
copyright. If you are not the intended recipient, please email the sender or
telephone +44 (0)1442 213440 and delete this message and any attachment from
your system. Dissemination and or copying of this email is prohibited if you
are not the intended recipient.

We believe, but do not warrant, that this email and any attachments are
virus free. You should take full responsibility for virus checking.

No responsibility is accepted by FUJIFILM Electronic Imaging Limited for
personal emails or emails unconnected with FUJIFILM Electronic Imaging
Limited's business.
----------------------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]