[ECOS] Re: RAM vs. ROMRAM question

Grant Edwards grante@visi.com
Mon Oct 30 14:37:00 GMT 2006


In gmane.os.ecos.general, you wrote:
>  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. 

Right.  My HAL has separate .ldi files for RedBoot.

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

I use option B: "configury to select a different .ldi file
depending on what is being built".  My HAL has separate .ldi
files for RedBoot.

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

Except then ecosconfig won't let you configure RedBoot as a
monitor without complaining.  Which was my initial point:
there's nothing that says a monitor can't run in RAM, so why
does ecosconfig object to that?

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

Our hardware guy didn't think it would be a problem to pull all
of RedBoot out of serial flash and write it into RAM.  He says
it would save a few dollars.

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

A ha.  I guess that's the assumption I've been missing: that
RAM startup RedBoot has to run from the same address as a
normal eCos application.  In the past I've never configured my
HALs that way, and I didn't realize that was assumed.

-- 
Grant Edwards                   grante             Yow!  Will the third world
                                  at               war keep "Bosom Buddies"
                               visi.com            off the air?

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