This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: executing applications
- To: Stijn Symons <stijn dot symons at acunia dot com>
- Subject: Re: [ECOS] executing applications
- From: Gary Thomas <gthomas at redhat dot com>
- Date: Thu, 16 Aug 2001 09:32:18 -0600 (MDT)
- Cc: eCos Discussion <ecos-discuss at sourceware dot cygnus dot com>
- Organization: Red Hat, Inc.
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.