This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: debugging program on ARM target
- From: Grant Edwards <grante at visi dot com>
- To: Benjamin Tze-Kit Lee <btlee at sfu dot ca>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 6 Aug 2002 17:11:03 -0500
- Subject: Re: debugging program on ARM target
- References: <Pine.GSO.4.44.0208061437370.2570-100000@fraser.sfu.ca>
On Tue, Aug 06, 2002 at 02:44:40PM -0700, Benjamin Tze-Kit Lee wrote:
> I would like to debug a program on a board that's using the ARM
> cpu. In order to do that I think I would need the "rdi" option
> for target.
Maybe.
You use the "rdi" target if your target talks ADP (Angel
Debugging Protocol). If you've got an eval board with the
Angel ROM monitor, then you can probably use rdi. You can also
use the "rdi" target if you're using a JTAG interface box that
talks ADP (e.g. EPI's Jeeni or ARM's EmbeddedICE).
> How can I get that option to work?
You issue the command
target rdi s=/dev/ttyS0
Replace /dev/ttyS0 with the device name of the serial port
you've connected to the target. If you want to use rdi, I'd
recommend getting a nice recent CVS snapshot, since the rdi
code used to suck up a lot of CPU time while busy-waiting for
ADP messages. I've got a patch for 5.2.1 if you want.
There are other JTAG interface boxes that use other protocols,
and there are other ROM monitors that use other protocols (like
GDB's "remote" protocol).
> I've also seen some examples in the web that I can do the
> remote debugging on the ARM by using a program called
> arm-elf-gdb
That is just GDB that has been built for debugging ARM code.
> ........ but I am not sure where I can get it.
I think the easiest thing is to build it from sources, but
that's probably just a personality flaw on my part. Here's one
set of instructions on building ARM tools under Unix:
http://sources.redhat.com/ecos/tools/linux-arm-elf.html
Basically, when you configure gdb, just specify
"--target=arm-elf" and do the build. You may have to build
binutils first -- I always do it that way.
I've got a source RPM for arm-elf-gdb sitting around somewhere.
If you want a copy let me know.
> Is that Linux based? Or it actually runs on Unix too?
It's just GDB.
--
Grant Edwards
grante@visi.com