[ECOS] Newbie question: (gdb) target sim doesn't work for me

Rutger Hofman rutger@few.vu.nl
Wed Sep 28 22:03:00 GMT 2005


Hi list,

I'm trying to evaluate eCos for our Xscale board, but
I don't seem to be able to get started even using
the gdb simulator; the build seems OK, making the test
program seems OK, but running from gdb with 'target sim'
leads to prolonged silence.

Details:

I tried a number of templates, for StrongArm, Intel Xscale
boards, etc, just to see if I could run with the gdb
simulator, but all fail in the same way.

Example: Intel StrongArm SA1100 board.
I configure this as if out-of-the box. Do build tree, make
(works both using configtool or command line tool). The
typical compile command within the build of eCos itself
is like:

-------------------------------------------------------------------------
arm-elf-gcc -c 
-I/home/rutger/projects/rfid-guardian/ecos/strongArm/strongArm-sa1100_install/include 
-I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0 
-I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/src 
-I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/tests 
-I. 
-I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/src/ 
-mcpu=strongarm1100 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti 
-fno-exceptions -fvtable-gc -finit-priority -Wp,-MD,src/hal_diag.tmp -o 
src/hal_arm_sa11x0_var_hal_diag.o 
/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/src/hal_diag.c
-------------------------------------------------------------------------

So then I create my hello.c:

-------------------------------------------------------------------------
#include <stdio.h>

int main(int argc, char *argv[])
{
     printf("Hello world\n");
     return 0;
}
-------------------------------------------------------------------------

and compile this way:

-------------------------------------------------------------------------
/home/rutger/projects/rfid-guardian/ecos/gnutools/arm-elf/bin/arm-elf-gcc  -Wall 
-g2 -mcpu=strongarm1100 -Wpointer-arith -Wstrict-prototypes -Winline -Wundef 
-Woverloaded-virtual -ffunction-sections -fdata-sections -fno-rtti 
-fno-exceptions -fvtable-gc -finit-priority 
-I/home/rutger/projects/rfid-guardian/ecos/strongArm/strongArm-sa1100_install/include 
-L/home/rutger/projects/rfid-guardian/ecos/strongArm/strongArm-sa1100_install/lib 
-Ttarget.ld -nostdlib  hello.c   -o hello
-------------------------------------------------------------------------

(borrowed all these flags from the standard eCos build, although methinks that
arm-elf-gcc -g -I...._install/include -L...._install/lib -Ttarget.ld -nostdlib
would work as well; in this case, fail in the same way).

All successful.

Then I follow the example in the User Manual:

-------------------------------------------------------------------------
$ arm-elf-gdb -nw hello
GNU gdb 5.3 (eCosCentric)
Copyright 2002 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.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .rom_vectors, size 0x40 vma 0x40000000
Loading section .text, size 0x10274 vma 0x40000040
Loading section .rodata, size 0x29c vma 0x400102b4
Loading section .data, size 0x564 vma 0x8000
Start address 0x40000040
Transfer rate: 546208 bits in <1 sec.
(gdb) run


-------------------------------------------------------------------------

Then prolonged silence. If I interrupt, the stack trace is typically:

-------------------------------------------------------------------------
Program received signal SIGINT, Interrupt.
0x9da48ef8 in ?? ()
-------------------------------------------------------------------------


Where do I screw up? Or is gdb simulator usage impossible for a board
with devices, interrupt vectors etc that I don't have here?

Thanks in advance for the help,

Rutger Hofman
VU Amsterdam

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