This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Accessing flash memory
- From: seebs at plethora dot net (Peter Seebach)
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 24 Jan 2006 02:15:45 -0600
- Subject: [ECOS] Accessing flash memory
- Reply-to: seebs at plethora dot net (Peter Seebach)
Hi! I am doing some work on the TAMS MOAB board. It has 128M of flash
memory. I am an embedded systems newbie, but pretty good at C.
I created a reserved chunk using "fis create ...".
I now want to access this storage from my program. I don't need a filesystem;
I just want to read and write a chunk of data to and from this.
Do I just record the address I specified to fis in my program and, write to
it? This seems like it would be inefficient with flash devices, but it ought
to at least work.
So, for instance, if "fis list" says that a given region has the address
0xC3800000, should I be able to store to the first byte in that region with:
unsigned char *p = (unsigned char *) 0xC3800000;
*p = 23;
If not, what's the method for accessing flash? I'm a bit confused...
-s
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss