* [ECOS] loading and executing an ELF image from flash.
@ 2006-07-07 14:35 David Ho
2006-07-07 14:54 ` [ECOS] " David Ho
0 siblings, 1 reply; 5+ messages in thread
From: David Ho @ 2006-07-07 14:35 UTC (permalink / raw)
To: ecos-discuss
Hi,
Thanks so much for all the help, I now have redboot running on my
custom board with flash support.
The next step, which is one of my main objective is to be able to load
an ELF image from flash to the corresponding RAM regions and have
redboot jump to the right entry point specified in the ELF header.
I tried a simple _fis create_ of the ELF image to flash, but when I
did _fis load_ all it did was load the ELF image as is to RAM _Mem
addr_. Is there currently a way to load an ELF image correctly?
Thanks, David
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ECOS] Re: loading and executing an ELF image from flash.
2006-07-07 14:35 [ECOS] loading and executing an ELF image from flash David Ho
@ 2006-07-07 14:54 ` David Ho
2006-07-07 16:23 ` David Ho
2006-07-09 22:41 ` Gary Thomas
0 siblings, 2 replies; 5+ messages in thread
From: David Ho @ 2006-07-07 14:54 UTC (permalink / raw)
To: ecos-discuss
The reason I need to load an ELF image is because we have both
internal RAM and external RAM in our system and we would like to place
code in the critical path in internal RAM for faster access and leave
the non-critical code in external RAM.
Because the two regions cannot be made contiguous, I cannot load it as
one binary image.
Thanks, David
On 7/7/06, David Ho <davidkwho@gmail.com> wrote:
> Hi,
>
> Thanks so much for all the help, I now have redboot running on my
> custom board with flash support.
>
> The next step, which is one of my main objective is to be able to load
> an ELF image from flash to the corresponding RAM regions and have
> redboot jump to the right entry point specified in the ELF header.
>
> I tried a simple _fis create_ of the ELF image to flash, but when I
> did _fis load_ all it did was load the ELF image as is to RAM _Mem
> addr_. Is there currently a way to load an ELF image correctly?
>
> Thanks, David
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ECOS] Re: loading and executing an ELF image from flash.
2006-07-07 14:54 ` [ECOS] " David Ho
@ 2006-07-07 16:23 ` David Ho
2006-07-09 22:41 ` Gary Thomas
1 sibling, 0 replies; 5+ messages in thread
From: David Ho @ 2006-07-07 16:23 UTC (permalink / raw)
To: ecos-discuss
These are the commands I used. I don't have ethernet btw, transfer
done over xmodem.
load -r -b 0xc000 -m xmodem -c 0
fis create RedBoot[RAM] -e 0xc040
fis load RedBoot[RAM]
David
On 7/7/06, David Ho <davidkwho@gmail.com> wrote:
> The reason I need to load an ELF image is because we have both
> internal RAM and external RAM in our system and we would like to place
> code in the critical path in internal RAM for faster access and leave
> the non-critical code in external RAM.
>
> Because the two regions cannot be made contiguous, I cannot load it as
> one binary image.
>
> Thanks, David
>
> On 7/7/06, David Ho <davidkwho@gmail.com> wrote:
> > Hi,
> >
> > Thanks so much for all the help, I now have redboot running on my
> > custom board with flash support.
> >
> > The next step, which is one of my main objective is to be able to load
> > an ELF image from flash to the corresponding RAM regions and have
> > redboot jump to the right entry point specified in the ELF header.
> >
> > I tried a simple _fis create_ of the ELF image to flash, but when I
> > did _fis load_ all it did was load the ELF image as is to RAM _Mem
> > addr_. Is there currently a way to load an ELF image correctly?
> >
> > Thanks, David
> >
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Re: loading and executing an ELF image from flash.
2006-07-07 14:54 ` [ECOS] " David Ho
2006-07-07 16:23 ` David Ho
@ 2006-07-09 22:41 ` Gary Thomas
2006-07-24 14:53 ` David Ho
1 sibling, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2006-07-09 22:41 UTC (permalink / raw)
To: David Ho; +Cc: ecos-discuss
David Ho wrote:
> The reason I need to load an ELF image is because we have both
> internal RAM and external RAM in our system and we would like to place
> code in the critical path in internal RAM for faster access and leave
> the non-critical code in external RAM.
>
> Because the two regions cannot be made contiguous, I cannot load it as
> one binary image.
>
> Thanks, David
>
> On 7/7/06, David Ho <davidkwho@gmail.com> wrote:
>> Hi,
>>
>> Thanks so much for all the help, I now have redboot running on my
>> custom board with flash support.
>>
>> The next step, which is one of my main objective is to be able to load
>> an ELF image from flash to the corresponding RAM regions and have
>> redboot jump to the right entry point specified in the ELF header.
>>
>> I tried a simple _fis create_ of the ELF image to flash, but when I
>> did _fis load_ all it did was load the ELF image as is to RAM _Mem
>> addr_. Is there currently a way to load an ELF image correctly?
>>
>> Thanks, David
>>
>
There currently isn't a way to do this directly using the FIS commands.
That said, the new 'load' command structure can easily be extended for
any media, so it wouldn't be too hard to extend RedBoot to be able to
do something like this:
RedBoot> lo -m flash image.elf
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Re: loading and executing an ELF image from flash.
2006-07-09 22:41 ` Gary Thomas
@ 2006-07-24 14:53 ` David Ho
0 siblings, 0 replies; 5+ messages in thread
From: David Ho @ 2006-07-24 14:53 UTC (permalink / raw)
To: Gary Thomas; +Cc: ecos-discuss
> There currently isn't a way to do this directly using the FIS commands.
> That said, the new 'load' command structure can easily be extended for
> any media, so it wouldn't be too hard to extend RedBoot to be able to
> do something like this:
> RedBoot> lo -m flash image.elf
Thanks to the invaluable guidance, I was able to get ELF booting from
flash fairly easily.
I guess this could be extended to an explicit flash address, but I
will allow other brave souls to tackle that issue. I have the code
available and I can fix it up if others are interested.
David
RedBoot> load -r -b 0x10000000 -m xmodem -c 0
CRaw file loaded 0x10000000-0x1001931a, assumed entry at 0x10000000
xyzModem - CRC mode, 807(SOH)/0(STX)/0(CAN) packets, 1 retries
RedBoot> fis create -b 0x10000000 -l 0x1931a -e 0x0 RedBoot2
** WARNING: RAM address: 0x10000000 may be invalid
valid range is 0x00000000-0x00040000
... Erase from 0x00420000-0x00440000: ..
... Program from 0x10000000-0x1001931a at 0x00420000: ..
... Erase from 0x007e0000-0x007f0000: .
... Program from 0x00030000-0x00040000 at 0x007e0000: .
... Program from 0x0003000a-0x0003000c at 0x007e000a: .
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x00400000 0x00400000 0x00020000 0x00000000
RedBoot2 0x00420000 0x10000000 0x00020000 0x00000000
RedBoot config 0x007D0000 0x007D0000 0x00001000 0x00000000
FIS directory 0x007E0000 0x007E0000 0x00010000 0x00000000
Redundant FIS 0x007F0000 0x007F0000 0x00010000 0x00000000
RedBoot> x -b 0x420000
00420000: 7F 45 4C 46 01 01 01 61 00 00 00 00 00 00 00 00 |.ELF...a........|
00420010: 02 00 28 00 01 00 00 00 40 00 00 10 34 00 00 00 |..(.....@...4...|
RedBoot> load -m fis Redboot2
RedBoot> go
+
RedBoot(tm) bootstrap and debug environment [RAM]
Non-certified release, version UNKNOWN - built 13:33:43, Jul 21 2006
Platform: NMX SATMODEM (ARM7TDMI)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
RAM: 0x00000000-0x00040000, [0x100121e8-0x00040000] available
0x10000000-0x10100000, [0x10000000-0x10100000] available
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-07-24 14:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 14:35 [ECOS] loading and executing an ELF image from flash David Ho
2006-07-07 14:54 ` [ECOS] " David Ho
2006-07-07 16:23 ` David Ho
2006-07-09 22:41 ` Gary Thomas
2006-07-24 14:53 ` David Ho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).