This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fw: Can't download/trace hello.c example using gdb


Hi,
I have been through all the ecos doc + mailing list info.
But I still have a basic problem:

-I can't seem to be able to correctly download the hello.c program to my PC
target using the serial
line, under gdb

1- My host system is Windows .
2- My target is a PC i386 under Redboot (redboot.bin floppy version, I got
from Ecos web site)
3- I have downloaded the latest Ecos repository, plus the new windows based
Ecos configuration
tool.

4- I was able to generate the build and install tree. Here is the content of
my install tree "lib" directory
/home/jfs/mylibrary/test2_install/lib
total 4143
-rw-r--r--    1 jfs      Aucun      111430 Dec 28 00:28 extras.o
-rw-r--r--    1 jfs      Aucun      116088 Dec 28 00:27 libextras.a
-rw-r--r--    1 jfs      Aucun     4002630 Dec 28 00:28 libtarget.a
-rw-r--r--    1 jfs      Aucun        3262 Dec 28 00:28 target.ld
-rw-r--r--    1 jfs      Aucun        6656 Dec 28 00:28 vectors.o

5-I have cc/linked a simple hello.c with the following script:
i386-elf-gcc -g -o hello.exe \
-I/home/jfs/mylibrary/test2_install/include hello.c \
-L/home/jfs/mylibrary/test2_install/lib  \
-T/home/jfs/mylibrary/test2_install/lib/target.ld -nostdlib


6- I then connect my windows host to my i386 PC target using a COM1 to COM1
cross over serial
lin. Using hyperterminal on my host, I can see that I get the redboot
prompt.
Also from there, if I type $Hc-1#09, I get  +$OK#9a. So far so good.



7-Problem with GDB:  If I try to use gdb (command line mode), I have the
following problem:

(on my windows host, from a cygwin bash window)
$ i386-elf-gdb
set remotebaud 38400
file hello
b main
target remote com1
(Next it says something like:
Remote debugging using com1
<some address> in ?? ()
 (gdb) )

load hello.exe       ( Here I see a lot of activity on a RS232 break out box
I have on the serial link.
I assume data is being sent)
continue

Then it says "continuing" and I never hit the main() breakpoint nor do I see
the "hello world"
msg on my i386 SVGA PC screen (which froze after it got the gdb string from
the host) or in
my bash window, that runs the gdb session.


I suspect something wentwrong during my library build. Are there any
pre-built examples for the PC target?

Thanks a lot
-jf simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]