[ECOS] remote debug error

Jonathan Larmour jlarmour@redhat.co.uk
Sat Apr 29 09:01:00 GMT 2000

> zhang wrote:
> Hi,when we debug our remote target(PC),we use the given
> example:hello.c,but after we execute the afterwards commands,a error come
> out: receive SIGNILL,illegal instruction.
>     our commands list as follow:
>     make hello
>     i386-elf-gdb -b 38400
>     target remote /dev/ttyS0
>     load hello.o
>     contine
>     Then error occur and the "receive SIGNILL,illegal instruction"
> message display on the screen.
>     And we also find that the size of file hello.o is only  about 5K .
>     However if we use another method to complile like this :
>     i386-elf-gcc -g -IBASEDIR/install/include hello.c -o hello.o
>           -LBASEDIR/install/lib -Ttarget.ld -nostdlib
> the size of object file hello.o is about 500K,so I do not know why this
> could occur,could anyone help me ?

.o is conventionally the extension for intermediate object files. Some
tools determine the type of file they are dealing with from the extension,
so it is unwise to choose the extension .o for a final object. But what is
more, if the hello.o you are downloading is 5K, then it is the intermediate
object file and *not* the program you want to download with GDB.

If you are using the example makefile, then the file you want to download
to GDB is called just "hello", and *should* be about 500K, not 5K. However
(as I just pointed out to someone else) this file size is *not* the same as
the size of the *program*. To determine the size of the program, use e.g.
i386-elf-size on the executable. You can also massively reduce the
footprint if you use eCos's configurability features.

There is a section at the end of the Getting Started with eCos manual that
walks you through this stuff, and it would be good if you could go through

Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

More information about the Ecos-discuss mailing list