[ECOS] Re: RAM vs. ROMRAM question

Nick Garnett nickg@ecoscentric.com
Mon Oct 30 14:24:00 GMT 2006


 Grant Edwards <grante@visi.com> writes:

> On 2006-10-30, Nick Garnett <nickg@ecoscentric.com> wrote:
> 
> > Using a RAM RedBoot to load RAM applications will not work
> > since RedBoot would load at exactly the same address as the
> > applications, with obvious bad consequences.
> 
> That's odd, I do it all the time. ;) I've been shipping
> products for years where RedBoot runs from RAM as a "ROM
> Monitor" and loads applications into RAM.  All you have to do
> is run RedBoot in a section of RAM that you don't use for
> applications.

Sure. But you have to build RedBoot differently from normal RAM
applications in that case. 


> 
> > If this functionality is needed then RedBoot needs to be
> > relocated.
> 
> Which I guess is what I've done.

You must have. Depending on the target there are several ways of doing
this from an explicit startup type, configury to select a different
.ldi file depending on what is being built, to explicit config options
to set the RAM load address.

> 
> > Since the main reason for doing this is often to allow RedBoot
> > to be loaded via JTAG,
> 
> I usually run RedBoot from RAM because
> 
>  1) On my targets, RAM is several orders of magnitude faster
>     than ROM, and it allows RedBoot to keep up with network
>     traffic better.
> 
>  2) Doing things like re-formatting flash and updating RedBoot
>     is much simpler if your not runnning from flash.  
>

Both of which are what ROMRAM startup is designed to do.


> I've been talking to our hardware guys about our next desing,
> andit might not even have any any executable ROM, so RedBoot
> will have to run from RAM.

Using a built-in bootstrap to pull in an executable via I2C or SPI
from a serial flash part is certainly possible. Such an executable
probably need to be a careful combination of ROM and RAM startup as
far as initialization is concerned. On some platforms you may need a
two stage bootstrap to get a large application loaded.


>     
> > then targets that support this usually have a JTAG startup
> > type to support this. The same startup type supports the
> > running of full applications via JTAG too.
> 
> I've never heard of a JTAG startup type.  How does it differ
> from RAM startup?
>

Off the top of my head, there are two main differences:

1. Memory layout: usually it loads where a ROMRAM RedBoot would go, so
   that RAM applications can be loaded at their normal address. A RAM
   RedBoot would load at the same address as applications.

2. Initialization: It needs to initialize more of the system than a
   RAM RedBoot, since it cannot assume it is being loaded by a ROM
   RedBoot which will have already initialized most of the
   hardware. It also may need to do less that an ROM RedBoot, for
   example it cannot reinitialize the controller for the SDRAM it is
   running out of. Usually, some portion of the initialization has
   been performed by the JTAG device/software before the executable is
   loaded.

Of course on some targets these issues may not be important, and a
RAM startup RedBoot will work directly.


-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


-- 
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