[ECOS] RAM vs. ROMRAM question

Andrew Lunn andrew@lunn.ch
Sun Oct 29 23:21:00 GMT 2006


On Sun, Oct 29, 2006 at 11:01:30PM +0000, Grant Edwards wrote:
> I just build RedBoot for both RAM and ROMRAM startup for the
> Altera NIOS2 platform.  I looked at the section headers for the
> resulting redboot.elf files, and they're basically the same.
> 
> The VMA and LMA for text/data sections are in RAM for both
> version. Shouldn't the text/data LMA address for ROMRAM startup
> be in ROM?

No, i don't think so. If you were using a run time loader which was
actually interpreting the header and loading the code into the correct
place it might matter, but with ROMRAM starrup the eCos HAL itself is
doing the copy from ROM to RAM and the addresses are hard coded into
the image. The start code which does the copy is position independent,
or at least aware its not running where it was linked to run and so
can take the appropriate action.

    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



More information about the Ecos-discuss mailing list