Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Debugging of embedded target applications
@ 2002-05-07 22:05 Siders, Keith
  2002-05-07 22:15 ` Daniel Jacobowitz
  2002-05-07 22:33 ` Geoffrey Espin
  0 siblings, 2 replies; 9+ messages in thread
From: Siders, Keith @ 2002-05-07 22:05 UTC (permalink / raw)
  To: Linux-Mips (E-mail)

I am using x86 Linux for host development to a MIPS Linux embedded target. I
finally have a hardware debugger for my target board that works, but I have
to get large application files downloaded in a timely fashion. The debugger
must download to the target via JTAG, therefore downloads have lots of bits
of overhead, i.e. downloads are slow. Is there anything like a gdb server
that can I run on the target to connect to a remote client via ethernet? I
don't really want to have to compile a complete gdb tool to run on my target
board to do this. I don't have the luxury of a lot of memory on this board,
and no swap space (flash-based system, no hdd). The real catch is I would
like to be able to resolve the symbols of the application so the debugger
can be used to set hardware breakpoints, and provide source-level debugging
of the application. Or am I going about this totally bassackwards?

Keith

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-07 22:05 Debugging of embedded target applications Siders, Keith
@ 2002-05-07 22:15 ` Daniel Jacobowitz
  2002-05-07 22:44   ` Geoffrey Espin
  2002-05-07 22:33 ` Geoffrey Espin
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2002-05-07 22:15 UTC (permalink / raw)
  To: Siders, Keith; +Cc: Linux-Mips (E-mail)

On Tue, May 07, 2002 at 05:05:36PM -0500, Siders, Keith wrote:
> I am using x86 Linux for host development to a MIPS Linux embedded target. I
> finally have a hardware debugger for my target board that works, but I have
> to get large application files downloaded in a timely fashion. The debugger
> must download to the target via JTAG, therefore downloads have lots of bits
> of overhead, i.e. downloads are slow. Is there anything like a gdb server
> that can I run on the target to connect to a remote client via ethernet? I
> don't really want to have to compile a complete gdb tool to run on my target
> board to do this. I don't have the luxury of a lot of memory on this board,
> and no swap space (flash-based system, no hdd). The real catch is I would
> like to be able to resolve the symbols of the application so the debugger
> can be used to set hardware breakpoints, and provide source-level debugging
> of the application. Or am I going about this totally bassackwards?

There is an appropriate program.  In fact, you even got the name right:
it's called "gdbserver", and is included with the GDB distribution.

I recommend you get GDB 5.2, released last week; the gdbserver included
in that version is far superior for GNU/Linux targets to any previous
release.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-07 22:05 Debugging of embedded target applications Siders, Keith
  2002-05-07 22:15 ` Daniel Jacobowitz
@ 2002-05-07 22:33 ` Geoffrey Espin
  1 sibling, 0 replies; 9+ messages in thread
From: Geoffrey Espin @ 2002-05-07 22:33 UTC (permalink / raw)
  To: Siders, Keith; +Cc: Linux-Mips (E-mail)

On Tue, May 07, 2002 at 05:05:36PM -0500, Siders, Keith wrote:
> I am using x86 Linux for host development to a MIPS Linux embedded target. I
> finally have a hardware debugger for my target board that works, but I have
> to get large application files downloaded in a timely fashion. The debugger
> must download to the target via JTAG, therefore downloads have lots of bits
> of overhead, i.e. downloads are slow. Is there anything like a gdb server
> that can I run on the target to connect to a remote client via ethernet? I

If you have a Linux Ethernet driver working, then most people
boot and mount with an NFS root disk.  Then you just cross-compile
additional apps and tools and adding to your NFS disk.  Presumably
including gdb (not tried it).  Then just debug "normally" -- with
the CLI.  The JTAG hardware debugger is not used (or maybe just
to initially bootstrap the kernel and trap certain exceptions).

RH7.1 fs at: ftp://ftp.linux.sgi.com/pub/linux/mips/mipsel-linux/root/
And see: http://www.linux.sgi.com/downloads.html

Once your basic apps are complete, then you can think about
creating a JFFS2 partition (after the MTD flash driver's debuggged)
and using that for standalone bootup.

Actually, my first approach was to flash the linux kernel with
just a cramfs'd busybox and then NFS mount my home directory from
a startup script.

To save (a lot of) space in applications checkout uclibc.org.
Shared libs support with uclibc is real close for MIPS, but for
now use static linking.

Geoff
-- 
Geoffrey Espin
espin@idiom.com
--

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-07 22:15 ` Daniel Jacobowitz
@ 2002-05-07 22:44   ` Geoffrey Espin
  2002-05-08  1:43     ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Geoffrey Espin @ 2002-05-07 22:44 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Siders, Keith, Linux-Mips (E-mail)

On Tue, May 07, 2002 at 06:15:12PM -0400, Daniel Jacobowitz wrote:
> it's called "gdbserver", and is included with the GDB distribution.
> I recommend you get GDB 5.2, released last week; the gdbserver included
> in that version is far superior for GNU/Linux targets to any previous
> release.

Does work it for kernel type debugging over *Ethernet*?
I see some docs saying "TCP/IP" connection... but does that
mean a special kind of network driver?  Or a gdbstub/agent
outside the kernel in a special monitor?

Geoff
-- 
Geoffrey Espin
espin@idiom.com
--

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-07 22:44   ` Geoffrey Espin
@ 2002-05-08  1:43     ` Daniel Jacobowitz
  2002-05-08  2:25       ` Geoffrey Espin
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2002-05-08  1:43 UTC (permalink / raw)
  To: Geoffrey Espin; +Cc: Siders, Keith, Linux-Mips (E-mail)

On Tue, May 07, 2002 at 03:44:27PM -0700, Geoffrey Espin wrote:
> On Tue, May 07, 2002 at 06:15:12PM -0400, Daniel Jacobowitz wrote:
> > it's called "gdbserver", and is included with the GDB distribution.
> > I recommend you get GDB 5.2, released last week; the gdbserver included
> > in that version is far superior for GNU/Linux targets to any previous
> > release.
> 
> Does work it for kernel type debugging over *Ethernet*?
> I see some docs saying "TCP/IP" connection... but does that
> mean a special kind of network driver?  Or a gdbstub/agent
> outside the kernel in a special monitor?

What do you mean by kernel type debugging?  It's not a kernel stub.  It
can debug user programs over TCP/IP or a serial line.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-08  1:43     ` Daniel Jacobowitz
@ 2002-05-08  2:25       ` Geoffrey Espin
  2002-05-08  2:32         ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Geoffrey Espin @ 2002-05-08  2:25 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Siders, Keith, Linux-Mips (E-mail)

On Tue, May 07, 2002 at 09:43:14PM -0400, Daniel Jacobowitz wrote:
> > Does work it for kernel type debugging over *Ethernet*?
> > I see some docs saying "TCP/IP" connection... but does that
> > mean a special kind of network driver?  Or a gdbstub/agent
> > outside the kernel in a special monitor?
> What do you mean by kernel type debugging?  It's not a kernel stub.  It
> can debug user programs over TCP/IP or a serial line.

In traditional embedded RTOS land, "system-level debugging".
In the olden days one had to have BDM/JTAG hardware assist
to step thru truly arbitary bits of code, like interrupt handlers,
scheduler.

The original question was about using using a hardware debugger.
Clearly using gdb/gdbserver is for apps only, AFAIK.  Does one
bother with a h/w debugger for apps?  Using kgdb with some kind
of remote debug-agent would be a "system level debugger", a s/w
solution to a traditional hardware only debug aid.  At this time
kind of pointless, as its painful to setup and JTAG debuggers
are so cheap (for mainline CPUs).

Geoff
-- 
Geoffrey Espin
espin@idiom.com
--

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-08  2:25       ` Geoffrey Espin
@ 2002-05-08  2:32         ` Daniel Jacobowitz
  2002-05-08 18:16           ` Jun Sun
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2002-05-08  2:32 UTC (permalink / raw)
  To: Geoffrey Espin; +Cc: Siders, Keith, Linux-Mips (E-mail)

On Tue, May 07, 2002 at 07:25:23PM -0700, Geoffrey Espin wrote:
> On Tue, May 07, 2002 at 09:43:14PM -0400, Daniel Jacobowitz wrote:
> > > Does work it for kernel type debugging over *Ethernet*?
> > > I see some docs saying "TCP/IP" connection... but does that
> > > mean a special kind of network driver?  Or a gdbstub/agent
> > > outside the kernel in a special monitor?
> > What do you mean by kernel type debugging?  It's not a kernel stub.  It
> > can debug user programs over TCP/IP or a serial line.
> 
> In traditional embedded RTOS land, "system-level debugging".
> In the olden days one had to have BDM/JTAG hardware assist
> to step thru truly arbitary bits of code, like interrupt handlers,
> scheduler.
> 
> The original question was about using using a hardware debugger.
> Clearly using gdb/gdbserver is for apps only, AFAIK.  Does one
> bother with a h/w debugger for apps?  Using kgdb with some kind

Actually, yes, you can.  I believe at least the Abatron BDI can do
this.  Could be wrong, though.

> of remote debug-agent would be a "system level debugger", a s/w
> solution to a traditional hardware only debug aid.  At this time
> kind of pointless, as its painful to setup and JTAG debuggers
> are so cheap (for mainline CPUs).

Depends on your platform.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: Debugging of embedded target applications
@ 2002-05-08 13:05 Siders, Keith
  0 siblings, 0 replies; 9+ messages in thread
From: Siders, Keith @ 2002-05-08 13:05 UTC (permalink / raw)
  To: Linux-Mips (E-mail); +Cc: 'Daniel Jacobowitz', Geoffrey Espin

Thanks for the lively discussion and input. It's now clear to me that I'll
be tracking (not tracing) the kernel with the h/w debugger through its kgdb
shell. We're still working on some drivers, so control over the kernel is a
must. I'll have to set up the server to autoload when a connection on a
particular port is attempted from another gdb shell, and shut down on
disconnection.

Keith

-> -----Original Message-----
-> From: Daniel Jacobowitz [mailto:dan@debian.org]
-> Sent: Tuesday, May 07, 2002 9:33 PM
-> To: Geoffrey Espin
-> Cc: Siders, Keith; Linux-Mips (E-mail)
-> Subject: Re: Debugging of embedded target applications
-> 
-> 
-> On Tue, May 07, 2002 at 07:25:23PM -0700, Geoffrey Espin wrote:
-> > On Tue, May 07, 2002 at 09:43:14PM -0400, Daniel Jacobowitz wrote:
-> > > > Does work it for kernel type debugging over *Ethernet*?
-> > > > I see some docs saying "TCP/IP" connection... but does that
-> > > > mean a special kind of network driver?  Or a gdbstub/agent
-> > > > outside the kernel in a special monitor?
-> > > What do you mean by kernel type debugging?  It's not a 
-> kernel stub.  It
-> > > can debug user programs over TCP/IP or a serial line.
-> > 
-> > In traditional embedded RTOS land, "system-level debugging".
-> > In the olden days one had to have BDM/JTAG hardware assist
-> > to step thru truly arbitary bits of code, like interrupt handlers,
-> > scheduler.
-> > 
-> > The original question was about using using a hardware debugger.
-> > Clearly using gdb/gdbserver is for apps only, AFAIK.  Does one
-> > bother with a h/w debugger for apps?  Using kgdb with some kind
-> 
-> Actually, yes, you can.  I believe at least the Abatron BDI can do
-> this.  Could be wrong, though.
-> 
-> > of remote debug-agent would be a "system level debugger", a s/w
-> > solution to a traditional hardware only debug aid.  At this time
-> > kind of pointless, as its painful to setup and JTAG debuggers
-> > are so cheap (for mainline CPUs).
-> 
-> Depends on your platform.
-> 
-> -- 
-> Daniel Jacobowitz                           Carnegie Mellon 
-> University
-> MontaVista Software                         Debian GNU/Linux 
-> Developer
-> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Debugging of embedded target applications
  2002-05-08  2:32         ` Daniel Jacobowitz
@ 2002-05-08 18:16           ` Jun Sun
  0 siblings, 0 replies; 9+ messages in thread
From: Jun Sun @ 2002-05-08 18:16 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Geoffrey Espin, Siders, Keith, Linux-Mips (E-mail)

Daniel Jacobowitz wrote:

> On Tue, May 07, 2002 at 07:25:23PM -0700, Geoffrey Espin wrote:
> 
>>On Tue, May 07, 2002 at 09:43:14PM -0400, Daniel Jacobowitz wrote:
>>
>>>>Does work it for kernel type debugging over *Ethernet*?
>>>>I see some docs saying "TCP/IP" connection... but does that
>>>>mean a special kind of network driver?  Or a gdbstub/agent
>>>>outside the kernel in a special monitor?
>>>>
>>>What do you mean by kernel type debugging?  It's not a kernel stub.  It
>>>can debug user programs over TCP/IP or a serial line.
>>>
>>In traditional embedded RTOS land, "system-level debugging".
>>In the olden days one had to have BDM/JTAG hardware assist
>>to step thru truly arbitary bits of code, like interrupt handlers,
>>scheduler.
>>
>>The original question was about using using a hardware debugger.
>>Clearly using gdb/gdbserver is for apps only, AFAIK.  Does one
>>bother with a h/w debugger for apps?  Using kgdb with some kind
>>
> 
> Actually, yes, you can.  I believe at least the Abatron BDI can do
> this.  Could be wrong, though.
> 


I have used kgdb over JTAG.

Jun

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-05-08 18:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-07 22:05 Debugging of embedded target applications Siders, Keith
2002-05-07 22:15 ` Daniel Jacobowitz
2002-05-07 22:44   ` Geoffrey Espin
2002-05-08  1:43     ` Daniel Jacobowitz
2002-05-08  2:25       ` Geoffrey Espin
2002-05-08  2:32         ` Daniel Jacobowitz
2002-05-08 18:16           ` Jun Sun
2002-05-07 22:33 ` Geoffrey Espin
  -- strict thread matches above, loose matches on Subject: below --
2002-05-08 13:05 Siders, Keith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox