This is the mail archive of the ecos-discuss@sourceware.org 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]

Re: Accessing flash memory


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


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