public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdbserver for embedded targets?
@ 2012-02-07 20:45 Greg McGary
  2012-02-10 20:53 ` Tom Tromey
  2012-02-14  8:54 ` Jeremy Bennett
  0 siblings, 2 replies; 3+ messages in thread
From: Greg McGary @ 2012-02-07 20:45 UTC (permalink / raw)
  To: gdb

Most gdbserver targets are full OSes (Linux, *BSD).  I need a remote stub for an embedded multi-core DSP target.  The DSPs are co-processors of an ARM, similar to the pairing of SPUs with PPC.  When debugging, there will always be a full OS (Linux or Windoze) front-end system available.  System topology looks like so:

    Workstation: gdb client
    ... TCP ...
    x86 front-end: gdbserver
    ... serial ...
    ARM co-processor: target control
    ... shared memory, control registers ...
    DSPs

The DSP doesn't handle interrupts, and all control is handled by the ARM, thus the ARM must run the stub.  Traditional stub functionality (remote protocol handling + target processor control) is divided betweenthe front-end systemthe ARM.  The front-end system will run gdbserver, and the target_ops will be populated with functions that send/receive requests over serial using a compact binary protocol.  The ARM will run a simple command loop.  The gdbserver/ARM interactions will be simple commands toread/write memory & registers, and control execution. 

I really don't want to write a remote-protocol server, and would rather leverage the existing gdbserver, since presumably it is maintained and stays current with enhancements to the remote protocol.

Question: is the gdbserver target_ops interface suitable for such a target?  I'm going to proceed under the assumption that it is, and will supplement if I find deficiencies.

Comments?

G

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

* Re: gdbserver for embedded targets?
  2012-02-07 20:45 gdbserver for embedded targets? Greg McGary
@ 2012-02-10 20:53 ` Tom Tromey
  2012-02-14  8:54 ` Jeremy Bennett
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2012-02-10 20:53 UTC (permalink / raw)
  To: Greg McGary; +Cc: gdb

>>>>> "Greg" == Greg McGary <greg.mcgary@gmail.com> writes:

Greg> Question: is the gdbserver target_ops interface suitable for such a
Greg> target?  I'm going to proceed under the assumption that it is, and
Greg> will supplement if I find deficiencies.

Greg> Comments?

I don't know gdbserver very well, so I can't comment on that.

There's also RDA, but I don't know if it is still live or not; but it
seems like it was more explicitly targeted to this sort of thing:

    http://sourceware.org/rda/

Tom

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

* Re: gdbserver for embedded targets?
  2012-02-07 20:45 gdbserver for embedded targets? Greg McGary
  2012-02-10 20:53 ` Tom Tromey
@ 2012-02-14  8:54 ` Jeremy Bennett
  1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Bennett @ 2012-02-14  8:54 UTC (permalink / raw)
  To: Greg McGary; +Cc: gdb

On Tue, 2012-02-07 at 13:45 -0700, Greg McGary wrote:

<snip>

> I really don't want to write a remote-protocol server, and would
> rather leverage the existing gdbserver, since presumably it is
> maintained and stays current with enhancements to the remote protocol.

Hi Greg,

A Remote Serial Protocol Server for a native target isn't a complex
program. Some simple serial comms to get the packets, and then a switch
statement on the text in the packet. You might find it quicker and
easier to write (or adapt) one, rather than modifying gdbserver.

A while ago, I wrote a short application note of implementing Remote
Serial Protocol Servers, which includes example code you can freely use.
You might find this useful:

        http://www.embecosm.com/download/ean4.html

HTH,


Jeremy

-- 
Tel:      +44 (1590) 610184
Cell:     +44 (7970) 676050
SkypeID: jeremybennett
Email:   jeremy.bennett@embecosm.com
Web:     www.embecosm.com

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

end of thread, other threads:[~2012-02-14  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-07 20:45 gdbserver for embedded targets? Greg McGary
2012-02-10 20:53 ` Tom Tromey
2012-02-14  8:54 ` Jeremy Bennett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).