This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Accessing flash memory
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Peter Seebach <seebs at plethora dot net>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 24 Jan 2006 09:28:20 +0100
- Subject: Re: [ECOS] Accessing flash memory
- References: <200601240815.k0O8Fj90001233@guild.plethora.net>
On Tue, Jan 24, 2006 at 02:15:45AM -0600, Peter Seebach wrote:
> 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...
Reading the documentation is a good place to start:
http://ecos.sourceware.org/docs-latest/ref/io-flash.html
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss