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]

running code from RAM / Memory Regions


Hi there,

I am trying to write to FLASH as part of eCos application.  I have just the
one FLASH chip on my custom board (ARM7TDMI core), from here all of my code
runs.

Because I can not read from FLASH whilst performing erase/program operations
on the chip I must run my FLASH programming code from RAM. 

I have never attempted to do anything like this before and would appreciate
some help.

I believe that it would be simpler if my FLASH control code resides at a
permanent / fixed location in RAM rather than allocating space for it each
time that it needs to run.  

I assume that, within the eCos config tool, I should therefore create a
memory region in my ROM memory area that is relocated into an area in RAM,
and that this will tell the compiler to compile the code as if it were
resident at the RAM address but place it in the final output file in the
address in ROM.

Does eCos copy the code from FLASH to this area of RAM on system start up
for me or do I need to copy it myself?  I would assume that I need to copy
it myself.

Am I approaching this the write way?  Are there any pitfalls I should watch
out for?  Has this already been done (obviously it has) but is the code
available?

Many thanks for taking the time to read this, any advice would be gratefully
received.

Kind regards,

Andy


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