Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Adding Filesystem on LPC2138 or 2294

2005-10-10 by wmwiese

Samuel...

>["SR" <emddjava@y...> wrote:]
> ... if anyone has any ideas on how I can add a filesystem
> to 2138 or the 2294's flash portion, i am thinking of FAT32
> is there any material/book I can get for a comprehensize 
> study on this, I need to basically do relative addressing when 
> logging or calling the log file, any help will be appreciated 

As I recall, FAT32 disk partitions need a minimum 'disk' size of 260MB
(that's MEGAbytes).  The old FAT12 is good for 'disks' up to about
16MB;  I believe FAT16 is good for 16MB to around 2GB. 

Given the internal flash of the 2294 (and prob the 2138) = 256kB,
you'd want to use FAT12. 

I believe there was an open FAT12 implementation in a fairly recent 
Circuit Cellar magazine article in the last 6 months. Not sure; this
may have been a read-only implementation.

For a commercial product, you'll likely use one of various commercial
vendors' file systems out there (NucleusFILE, SMX, Fusion, etc.) with
licensing, etc. - prob source code and linkable library versions are
out there.

You may have to figure out flash wear-levelling, flash erase block
size, and reuse strategies yourself if the filesystem isn't
flash-aware (or is only set up to talk to consumer flash devices like
SD/MMC, CF, etc. which manage this aspect inside the card).

A basic FAT filesystem has format, open, close, delete, rename, and
various read & write calls. These can be hooked, with some effort, and
tied into C library functions - or you just use the FAT library calls
instead. The basic FAT filesystems are used to working with block
devices and expect to call a read or write function that reads/writes
1...256 blocks of 512 bytes each (usu sector size, but this can be
changed).  You'll have to play w/cluster size vs erase block size.

If DOS compatibility is not needed (likely) there are probably better
filesystems to use  ---- unless your LPC2xxx flash will sometimes be
viewed as a USB memory device by a PC host.


Bill Wiese
San Jose, CA  USA

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.