MC 68040 debugging via JTAG with gdb?
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
MC 68040 debugging via JTAG with gdb?

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Carsten Krueger
Guest





Posted: Sat Dec 04, 2004 9:44 pm    Post subject: MC 68040 debugging via JTAG with gdb? Reply with quote

Hello all,

is it possible to debug a Motorola MC 68040 via JTAG?
I'm looking for a cheap way to debug software in MC 68040 via PC.
gdb would be perfect.
Something like macraigor OCDRemote but for this processor.

greetings
Carsten
--
http://learn.to/quote - richtig zitieren
http://www.realname-diskussion.info - Realnames sind keine Pflicht
http://oe-faq.de/ - http://www.oe-tools.de.vu/ - OE im Usenet
http://www.spamgourmet.com/ - Emailadresse(n) gegen Spam
Back to top
Lewin A.R.W. Edwards
Guest





Posted: Sun Dec 05, 2004 6:59 am    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Quote:
is it possible to debug a Motorola MC 68040 via JTAG?

I don't believe the 68040 has a JTAG port. All the hardware debuggers
I'm aware of for this processor are full ICEs that totally replace the
CPU.

If you want to use gdb on this processor, you will need to port gdb
stubs (I find it hard to believe that nobody has done this before...)
and connect over serial, Ethernet or whatever other interface is
readily available in your target system.
Back to top
Carsten Krueger
Guest





Posted: Sun Dec 05, 2004 10:39 pm    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Quote:
I don't believe the 68040 has a JTAG port.

It has, but I don't know which software is needed to use it.

Quote:
If you want to use gdb on this processor, you will need to port gdb
stubs

What is a stub?

greetings
Carsten
--
http://learn.to/quote - richtig zitieren
http://www.realname-diskussion.info - Realnames sind keine Pflicht
http://oe-faq.de/ - http://www.oe-tools.de.vu/ - OE im Usenet
http://www.spamgourmet.com/ - Emailadresse(n) gegen Spam
Back to top
Tauno Voipio
Guest





Posted: Sun Dec 05, 2004 10:45 pm    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Carsten Krueger wrote:
Quote:
What is a stub?

GDB stub is a piece of code in the target system. The stub
understands the GDB remote debugging protocol and functions
as the GDB's resident agent reading and setting register
contents, memory contents and breakpoints.

The stub functioning and structure is documented in the
GDB sources and documentation.

Googling 'gdb stub' gave about 43000 hits, at least the
first couple of pages fully relevant to the question.

--

Tauno Voipio
tauno voipio (at) iki fi
Back to top
Carsten Krueger
Guest





Posted: Mon Dec 06, 2004 2:19 am    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Thx, your abstract is much more clear than the hits (for me).

Interesting concept, but I don't know if I can use it. The problem is,
what do I do if my programm is crashed.
I think a stub is than "crashed", too.

greetings
Carsten
--
http://learn.to/quote - richtig zitieren
http://www.realname-diskussion.info - Realnames sind keine Pflicht
http://oe-faq.de/ - http://www.oe-tools.de.vu/ - OE im Usenet
http://www.spamgourmet.com/ - Emailadresse(n) gegen Spam
Back to top
Tauno Voipio
Guest





Posted: Mon Dec 06, 2004 2:55 pm    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Carsten Krueger wrote:
Quote:
Interesting concept, but I don't know if I can use it. The problem is,
what do I do if my programm is crashed.
I think a stub is than "crashed", too.

It depends.

If the stub is run interrupt-driven and the main code
crash did not succeed in destroying the interrupt
environment, you may still succeed in making a post-
mortem of the crash.

IMHO, the main use is in normal debugging, i.e. running
until a breakpoint, looking at variables, etc.

I have written a stub for ARM7TDMI and run it
successfully for a couple of years. As there are
graphic front-ends for GDB, it is actually a nice
debugging environment for an embedded system.

Regards from Helsinki, the home city of Linux.

--

Tauno Voipio
tauno voipio (at) iki fi
Back to top
Carsten Krueger
Guest





Posted: Mon Dec 06, 2004 4:17 pm    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Quote:
If the stub is run interrupt-driven and the main code
crash did not succeed in destroying the interrupt
environment, you may still succeed in making a post-
mortem of the crash.

good idea

gdb has a stub for Motorola :-)
http://sources.redhat.com/gdb/current/onlinedocs/gdb_18.html#SEC156

These working remote stubs are distributed with GDB:

i386-stub.c
For Intel 386 and compatible architectures.

m68k-stub.c
For Motorola 680x0 architectures.

sh-stub.c
For Renesas SH architectures.

sparc-stub.c
For SPARC architectures.

sparcl-stub.c
For Fujitsu SPARCLITE architectures.

Thx for your hints.

greetings
Carsten
--
http://learn.to/quote - richtig zitieren
http://www.realname-diskussion.info - Realnames sind keine Pflicht
http://oe-faq.de/ - http://www.oe-tools.de.vu/ - OE im Usenet
http://www.spamgourmet.com/ - Emailadresse(n) gegen Spam
Back to top
Eric Smith
Guest





Posted: Wed Dec 08, 2004 5:03 am    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Quote:
is it possible to debug a Motorola MC 68040 via JTAG?

The MC68040 doesn't have any in-circuit-debug support.
Back to top
Carsten Krueger
Guest





Posted: Wed Dec 08, 2004 10:23 pm    Post subject: Re: MC 68040 debugging via JTAG with gdb? Reply with quote

Quote:
The MC68040 doesn't have any in-circuit-debug support.

Thx for this clear statement.

Gruß Carsten
--
http://learn.to/quote - richtig zitieren
http://www.realname-diskussion.info - Realnames sind keine Pflicht
http://oe-faq.de/ - http://www.oe-tools.de.vu/ - OE im Usenet
http://www.spamgourmet.com/ - Emailadresse(n) gegen Spam
Back to top
fangstar



Joined: 30 Jan 2006
Posts: 1

Posted: Mon Jan 30, 2006 6:22 pm    Post subject: Stub Reply with quote

I have a question about the GDB stub. Where does the stub run? Is it on the host machine, the target board, or the JTAG controller.

I'm working on a project to connect GDB to a PowerPC4xx board using a JTAG controller. It's suppose to generic enough to support different types of controller (USB, ethernet, PCI...etc). I have .dll's for the controllers. I would like to avoid having another program running to convert the GDB remote protocol to JTAG commands (like the macraigor OCDRemote).

Is it possible to edit GDB so that it automatically uses the JTAG controller's .dll's directly? I am currently thinking no. From what I understand about GDB, I think that I need to use a stub since I'm doing a debugging remotely. But I really understand how a stub works and where it is suppose to run so I'm kinda stuck. I wanted to make sure that I start off in the right direction.

Any input would be appreciated.

Thanks,
Mitchell
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB