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]
Other format: [Raw text]

Re: Address calculation in RedBoot load function


On Wed, 2003-09-03 at 07:50, Wolfram Kattanek wrote:
> Quoting Gary Thomas <gary@mlbassoc.com>:
> 
> > Yes, this is how it is designed to work.  If you want RedBoot to be
> > able to load the code where it was compiled for (i.e. 0x450000), why
> > are you putting it at 0x220000 when you download it?
> 
> Because 0x450000 could be mapped to flash and 0x220000 could be in RAM.
> At least this results in wrong or misleading mem address and entry point
> entries in the FIS directory. Sometimes this makes it harder to
> differentiate between images built for flash and images built for RAM.
> 
> > There are times when it makes sense to override the offsets in the
> > S-record (or ELF) file, but most of the time you should just let 
> > things get loaded where they "belong."
> 
> Can you give an example for intended overriding of s-record defaults?
> 

The memory address kept by FIS is only useful if you intend to perform
"fis load <image>", i.e. use RedBoot to load code stored in FLASH into
RAM for execution (or other purposes).  If the code is designed to run
from FLASH, in your example 0x450000, then these values are irrelevant.

As for when you might want to override the S-record addresses, this is
exactly one of them.  For example if you have code that you want to 
write to the FLASH (say a RedBoot image), you need to load that into
RAM as one step and then write it to FLASH as a second step (we don't
support download directly to FLASH).  In this case you would need to
download to an address which is not what the program is compiled for
and then write it directly to the address in FLASH that it is supposed
to be at.  Since the "FIS load" command won't ever be used with this
image, it doesn't matter what the "memory" address kept in the FIS
table is.  Even if it did, just use the "-r XXX" option to "FIS create"
to set it to what you want/need.  You can also specify the "-e XXX"
option to set the entry point, but again, those values are not important
unless you are using "FIS load"

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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