This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: RAM vs. ROMRAM question
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Grant Edwards <grante at visi dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Mon, 30 Oct 2006 00:21:21 +0100
- Subject: Re: [ECOS] RAM vs. ROMRAM question
- References: <ei3bsa$3bu$1@sea.gmane.org>
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