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

Robin Farine acnrf@dial.eunet.ch
Tue Jan 8 06:17:00 GMT 2002


Maybe the order in which you enter the commands causes your problem.
Please try the following sequence:

$ i386-elf-gdb hello.exe
set remotebaud 38400
target remote com1
load
b main
c


HTH,

Robin

On Tue, 2002-01-08 at 13:37, jf simon wrote:
> 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
> 
> 
> 




More information about the Ecos-discuss mailing list