6502.org
http://forum.6502.org/

JTAG Debugger
http://forum.6502.org/viewtopic.php?f=10&t=4648
Page 1 of 1

Author:  sark02 [ Sun Aug 27, 2017 9:47 pm ]
Post subject:  JTAG Debugger

A feature that's common in microcontrollers and commercial IP cores is a JTAG based debug port. As far as I've seen, none of the open source 6502 cores contain one, so I was wondering: Is there any interest in this area? I often use JTAG based debuggers to single step and debug processor initialization code, setting hardware breakpoints and watchpoints in ROM/flash code, etc.

The experience here is quite broad, so I imagine many have you have also used these. Have you simply found hardware debug unnecessary for the simple 6502, or have you found more effective techniques to debug?

Author:  Alarm Siren [ Sun Aug 27, 2017 10:28 pm ]
Post subject:  Re: JTAG Debugger

I've never felt a particular need to use JTAG. Normally I just hang a couple of oscilloscope probes off lines of interest, single-cycle or single-step the processor and keep whacking my assembly program until it works.

Author:  BigDumbDinosaur [ Mon Aug 28, 2017 1:23 am ]
Post subject:  Re: JTAG Debugger

sark02 wrote:
A feature that's common in microcontrollers and commercial IP cores is a JTAG based debug port. As far as I've seen, none of the open source 6502 cores contain one, so I was wondering: Is there any interest in this area? I often use JTAG based debuggers to single step and debug processor initialization code, setting hardware breakpoints and watchpoints in ROM/flash code, etc.

The experience here is quite broad, so I imagine many have you have also used these. Have you simply found hardware debug unnecessary for the simple 6502, or have you found more effective techniques to debug?

A logic probe is usually sufficient for me. If I suspect a signal quality issue then I'll scope it.

Author:  GARTHWILSON [ Mon Aug 28, 2017 1:33 am ]
Post subject:  Re: JTAG Debugger

I know how it works and I like the idea of it, but I've never used it. Instead, I've done like Alarm Siren says. On 8-pin microcontrollers, I've used a single pin for outputting status bytes, and sets of bytes, bit-serial, capturing them on the 'scope, with a shorter pulse being a 0 and a longer one being a 1, with an extra bit's timing gap between bytes to make it easier to visually separate them on the screen. There's a start pulse at the beginning of the set that's 50% longer than a 1, followed by a similar-length dead time. Exact speed is not important, unlike RS-232. There's no need to actually stop the processor to do this. This can all be done one the same pin you might use for something like an LED indicator in the user interface for the final product (although for the data output, you'll bit-bang it much too fast to read it without an oscilloscope).

Author:  BigEd [ Mon Aug 28, 2017 8:40 am ]
Post subject:  Re: JTAG Debugger

Might be worth noting Hoglet's intelligent debug agent aka AtomBusMon, which puts a CPU on the FPGA next to the 6502, to run a command line interface, and has gadgets for watchpoints and breakpoints. It's a lot of logic, but if there's room, that's fine, and the interface is minimal: just a serial port. Even fewer pins than JTAG!

Author:  sark02 [ Mon Aug 28, 2017 4:15 pm ]
Post subject:  Re: JTAG Debugger

BigEd wrote:
Might be worth noting Hoglet's intelligent debug agent aka AtomBusMon
That's remarkable! Thanks for the link.

Author:  kakemoms [ Fri Sep 01, 2017 4:29 am ]
Post subject:  Re: JTAG Debugger

I found the internal debugger in Lattice diamond quite useful. It kind of removes the need to connect my logical probe, so I guess its more of convenience than actual need. It is also pretty large if you want lots of data.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/