6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 12, 2024 9:37 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: JTAG Debugger
PostPosted: Sun Aug 27, 2017 9:47 pm 
Offline

Joined: Tue Nov 10, 2015 5:46 am
Posts: 215
Location: Kent, UK
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: JTAG Debugger
PostPosted: Sun Aug 27, 2017 10:28 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
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.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
 Post subject: Re: JTAG Debugger
PostPosted: Mon Aug 28, 2017 1:23 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8180
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: JTAG Debugger
PostPosted: Mon Aug 28, 2017 1:33 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
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).

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: JTAG Debugger
PostPosted: Mon Aug 28, 2017 8:40 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
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!


Top
 Profile  
Reply with quote  
 Post subject: Re: JTAG Debugger
PostPosted: Mon Aug 28, 2017 4:15 pm 
Offline

Joined: Tue Nov 10, 2015 5:46 am
Posts: 215
Location: Kent, UK
BigEd wrote:
Might be worth noting Hoglet's intelligent debug agent aka AtomBusMon
That's remarkable! Thanks for the link.


Top
 Profile  
Reply with quote  
 Post subject: Re: JTAG Debugger
PostPosted: Fri Sep 01, 2017 4:29 am 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to: