[ECOS] Why gdb don't response diag_printf?
Thu Mar 27 03:07:00 GMT 2003
Firstly, I built a libtarget.a, and linked it with my hello.o to a elf file.
My target board is running a vxWorks boot program, there are not GDB stub in it. It can fetch a elf file from my host via FTP. once boot program gets elf file, it execute it. so my ecos application can be loaded.
I want to know: Whether I must make a Redboot and burn it to board flash if I want to use GDB to debug.
----- Original Message -----
From: "Jonathan Larmour" <jifl@eCosCentric.com>
To: "Water He" <hyhe@PhotonicBridges.com>
Cc: "ECOS-DISCUSS" <firstname.lastname@example.org>
Sent: Thursday, March 27, 2003 12:54 AM
Subject: Re: [ECOS] Why gdb don't response diag_printf?
> Water He wrote:
> > HI, I am using ecos current in our MPC8260 board. my board use a
> > vxWorks boot image and a SMC as serial port. so I compile my HelloWorld
> > program to an elf file. And it can be loaded via FTP by vxWorks boot
> > image correctly. I can use printf output message to the console port.
> > But now problem is: When I use diag_printf, it will stop there and
> > can't connect with GDB.
> It's still not clear what you are doing.... you load the application via
> FTP, not load a GDB stub, correct? And then you run the application and
> _then_ connect via GDB? How exactly do you do that?
> > Firstly, I open HyperTerminal. I notice that it
> > is waiting a input character '+'. If I press key '+', it output a
> > string like
> > "$O546872656164205B5461736B5F425D3A283030303030303139293A2064656C617920333832207469636B730A#A6"
> > and stop at this diag_printf and wait next '+'.
> That's program output encoded in GDB remote protocol format. '+' is the
> acknowledgement character normally sent by GDB to the program.
> > I decode previous
> > string and find out they are what I want to output. If I close
> > HyperTerminal, and start up powerpc-eabi-gdb #powerpc-eabi-gdb --nw
> > hello.exe (gdb)set remotebaud 9600 (gdb)target remote com2 Remote
> > debugging using com2 Ignoring packet error, continuing... Ignoring
> > packet error, continuing... Ignoring packet error, continuing...
> > Couldn't establish connection to remote target Malformed response to
> > offset query, timeout
> > I don't know why GDB don't send '+'. Or I miss some operation? How can
> > I?
> The program should be stopped when you try and connect. GDB can't connect
> to a running program.
> eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
> --[ "You can complain because roses have thorns, or you ]--
> --[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
More information about the Ecos-discuss