public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] executing applications
@ 2001-08-16  6:20 Stijn Symons
  2001-08-16  7:08 ` Gary Thomas
  2001-08-16  7:22 ` Jonathan Larmour
  0 siblings, 2 replies; 6+ messages in thread
From: Stijn Symons @ 2001-08-16  6:20 UTC (permalink / raw)


Hi,

is there any other way to execute an application other than gdb? We've
got the hello-world program running with gdb, but it get's lost when we
reset the ipaq. So we've been trying to load and execute the program in
redboot (in elf, binary and srec formats) but it won't run...

Is there a way to put the program in ROM with gdb or is there any other
way to get a program running on redboot/ecos?

thanks,

tom and stijn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [ECOS] executing applications
  2001-08-16  6:20 [ECOS] executing applications Stijn Symons
@ 2001-08-16  7:08 ` Gary Thomas
  2001-08-16  7:33   ` Stijn Symons
  2001-08-16  7:22 ` Jonathan Larmour
  1 sibling, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2001-08-16  7:08 UTC (permalink / raw)
  To: Stijn Symons; +Cc: \x03ecos-discuss

On 16-Aug-2001 Stijn Symons wrote:
> Hi,
> 
> is there any other way to execute an application other than gdb? We've
> got the hello-world program running with gdb, but it get's lost when we
> reset the ipaq. So we've been trying to load and execute the program in
> redboot (in elf, binary and srec formats) but it won't run...
> 

Exactly what happens?  This should work, with no source changes, by just
loading the file and then running it.

If you can provide some details, we may be able to help.

> Is there a way to put the program in ROM with gdb or is there any other
> way to get a program running on redboot/ecos?

Actually if you just set your startup type to ROM and rebuild then you'll
end up with something you can program into the FLASH.  However, this is
very dangerous, especially on the iPAQ, as once done, you'll not be able
to talk to the unit again until the FLASH has been restored.

Work on getting it to run using RedBoot - you'll be much happier and I'll
be able to sleep nights :-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] executing applications
  2001-08-16  6:20 [ECOS] executing applications Stijn Symons
  2001-08-16  7:08 ` Gary Thomas
@ 2001-08-16  7:22 ` Jonathan Larmour
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2001-08-16  7:22 UTC (permalink / raw)
  To: Stijn Symons; +Cc: \x03ecos-discuss

Stijn Symons wrote:
> 
> Hi,
> 
> is there any other way to execute an application other than gdb? We've
> got the hello-world program running with gdb, but it get's lost when we
> reset the ipaq. So we've been trying to load and execute the program in
> redboot (in elf, binary and srec formats) but it won't run...

You mean if it loads via GDB it works, but if you load the exact same
executable (albeit converted to binary or srec), if doesn't? That shouldn't
happen :-|. Are you running it with the correct entry point?
 
> Is there a way to put the program in ROM with gdb or is there any other
> way to get a program running on redboot/ecos?

Yes, assuming the sections are all loaded consecutively, you could load it
with GDB, then quit GDB, start a terminal emulator at which point you
should have the RedBoot command line, and then program it into free flash -
it will still be at the addresses that GDB loaded it to.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] executing applications
  2001-08-16  7:08 ` Gary Thomas
@ 2001-08-16  7:33   ` Stijn Symons
  2001-08-16  7:40     ` Gary Thomas
  0 siblings, 1 reply; 6+ messages in thread
From: Stijn Symons @ 2001-08-16  7:33 UTC (permalink / raw)
  To: Gary Thomas

Gary Thomas wrote:

> On 16-Aug-2001 Stijn Symons wrote:
> > Hi,
> >
> > is there any other way to execute an application other than gdb? We've
> > got the hello-world program running with gdb, but it get's lost when we
> > reset the ipaq. So we've been trying to load and execute the program in
> > redboot (in elf, binary and srec formats) but it won't run...
> >
>
> Exactly what happens?  This should work, with no source changes, by just
> loading the file and then running it.
>
> If you can provide some details, we may be able to help.

Basically we get rubbish. The dowload is flawless, but when we type "go
0x100000" (0x100000 is the base adress) we get a bunch of symbols on the
screen witch no sense at all or just plain nothing.
To get the binary and srec formats we did :

arm-elf-objcopy -O binary a.out hello.bin

the same for the srec format.

>
>
> > Is there a way to put the program in ROM with gdb or is there any other
> > way to get a program running on redboot/ecos?
>
> Actually if you just set your startup type to ROM and rebuild then you'll
> end up with something you can program into the FLASH.  However, this is
> very dangerous, especially on the iPAQ, as once done, you'll not be able
> to talk to the unit again until the FLASH has been restored.
>
> Work on getting it to run using RedBoot - you'll be much happier and I'll
> be able to sleep nights :-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] executing applications
  2001-08-16  7:33   ` Stijn Symons
@ 2001-08-16  7:40     ` Gary Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Thomas @ 2001-08-16  7:40 UTC (permalink / raw)
  To: Stijn Symons; +Cc: eCos Discussion

On 16-Aug-2001 Stijn Symons wrote:
> Gary Thomas wrote:
> 
>> On 16-Aug-2001 Stijn Symons wrote:
>> > Hi,
>> >
>> > is there any other way to execute an application other than gdb? We've
>> > got the hello-world program running with gdb, but it get's lost when we
>> > reset the ipaq. So we've been trying to load and execute the program in
>> > redboot (in elf, binary and srec formats) but it won't run...
>> >
>>
>> Exactly what happens?  This should work, with no source changes, by just
>> loading the file and then running it.
>>
>> If you can provide some details, we may be able to help.
> 
> Basically we get rubbish. The dowload is flawless, but when we type "go
> 0x100000" (0x100000 is the base adress) we get a bunch of symbols on the
> screen witch no sense at all or just plain nothing.
> To get the binary and srec formats we did :
> 
> arm-elf-objcopy -O binary a.out hello.bin
> 
> the same for the srec format.

Can you send me the ELF file?  Send it directly - off-list.

Also, exactly what steps did you take to build this image?  Note: you
should be able to work from exactly the same ELF image using either GDB
or raw RedBoot for loading & executing the file.

> 
>>
>>
>> > Is there a way to put the program in ROM with gdb or is there any other
>> > way to get a program running on redboot/ecos?
>>
>> Actually if you just set your startup type to ROM and rebuild then you'll
>> end up with something you can program into the FLASH.  However, this is
>> very dangerous, especially on the iPAQ, as once done, you'll not be able
>> to talk to the unit again until the FLASH has been restored.
>>
>> Work on getting it to run using RedBoot - you'll be much happier and I'll
>> be able to sleep nights :-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] executing applications
       [not found] <3B7BFE3B.11BA30A9@acunia.com>
@ 2001-08-16  8:32 ` Gary Thomas
  0 siblings, 0 replies; 6+ messages in thread
From: Gary Thomas @ 2001-08-16  8:32 UTC (permalink / raw)
  To: Stijn Symons; +Cc: eCos Discussion

On 16-Aug-2001 Stijn Symons wrote:
> 
> We have compiled the hello.c example as described in the ecos manual.
> When  we use gdb and load it in our ipaq it works but if we want to run it
> directly on the ipaq using redboot it doesn't.
> Is the start adres where the program is located maybe not the same as the adres
> of the starting point of the program?? And if that is the case, how can I
> determine the entry point?
> 

Why did you think that this program should be loaded at 0x100000?  Clearly
it belongs at 0x20000 - eCos programs are *not* position independent.

Here's a run of your program, first using GDB and then just RedBoot.

  [gthomas@hermes test]$ arm-elf-gdb -nw a.out 
  GNU gdb 4.18-ecos-99r1-991015
  Copyright 1998 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.  This version of GDB is supported
  for customers of Cygnus Solutions.  Type "show warranty" for details.
  This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
  (gdb) ipaq 
  0x500472d4 in ?? ()
  (gdb) lo
  Loading section .rom_vectors, size 0x40 lma 0x20000
  Loading section .text, size 0x10e34 lma 0x20040
  Loading section .rodata, size 0x470 lma 0x30e74
  Loading section .data, size 0x564 lma 0x312e4
  Start address 0x20040 , load size 71752
  Transfer rate: 95669 bits/sec.
  (gdb) c
  Continuing.
  Hello, eCos world!
  Interrupted while waiting for the program.
  Give up (and stop debugging it)? (y or n) y
  (gdb) q

  [gthomas@hermes test]$ arm-elf-objcopy -O srec a.out /tftpboot/test
  [gthomas@hermes test]$ telnet ipaq_gdb 9000
  Trying 192.168.1.35...
  Connected to ipaq_gdb.
  Escape character is '^]'.
  RedBoot> lo test
  Entry point: 0x00020040, address range: 0x00020000-0x00031848
  RedBoot> go
  Hello, eCos world!
  ^]
  telnet> close
  Connection closed.

As for how to tell the entry point? If you load S-records, RedBoot 
tells you as part of the load operation. 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-16  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-16  6:20 [ECOS] executing applications Stijn Symons
2001-08-16  7:08 ` Gary Thomas
2001-08-16  7:33   ` Stijn Symons
2001-08-16  7:40     ` Gary Thomas
2001-08-16  7:22 ` Jonathan Larmour
     [not found] <3B7BFE3B.11BA30A9@acunia.com>
2001-08-16  8:32 ` Gary Thomas

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