How do you Debug

I am curious what advances there have been in debugging on various platforms.
Back in the day, you went with ICE if you could afford it. Even then, you
were lucky if it worked without hitches.
There was the "Buffalo Monitor" on the 68hc11.
What are people doing with AVR and Pics these days?
What else is out there?
Thanks
Mike
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Sat, Jun 26, 2004 at 08:11:15PM +0000, Blueeyedpop wrote:

The short answer for me (AVR) is "it depends".
If I have a spare UART available, and I usually do (I mostly use the ATmega128 which has 2), I'll get at internal chip status information that way (good ole 'printf()').
If the problem is somewhat subtle, and perhaps timing related, and getting at data via the UART is too slow, my favorite tool then becomes an oscilloscope. I will generally toggle a few general purpose I/O lines that indicate where in the code the program is currently running. By judicious placement of the pin toggle locations, one can determine lots of juicy information about program flow, timing, etc, by watching the pins with a scope.
When I need full-blown single-step, source level debugging (not too often, but sometimes), I use my JTAGICE. Atmel's JTAGICE is $300, an order of magnitude cheaper than typical ICE setups. Even so, they are giving away FREE JTAGICE's to their summer Seminar Tour attendees.
Even so, if you don't manage to get one of the free one, there are now several third-party Atmel compatible JTAGICE products in the $40-$50 range. The run the same firmware as Atmel's device. These products are 2 orders of magnitude cheaper than typical ICE products, and are in the range of what I'd call affordable for even casual developers.
The JTAGICE is really neat because you get source level single-step debugging on the actual hardware, not simulated hardware like most ICEs. It can run at full speed until it hits a breakpoint, at which time you will be dropped into the debugger with full source and variable access to display and change variables, set/remove breakpoints, etc.
Atmel is coming out with a new JTAGICE, the JTAGICE MkII, which may explain the freebies of the old model. I'm not sure what new capabilities it has, but it does support a new debug interface which requires just 1 wire instead of the usual 4 wires required for the older JTAGICE. Many of the newer Atmel chips that have low pin count and can't afford a 4-wire debug interface are being made with the 1-wire debug interface. Thus the JTAGICE MkII will open up the door to full source level single-step debugging even for tiny 8-pin chips. Neat trick.
-Brian
--
Brian Dean
http://www.bdmicro.com/
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

As Brian mentioned, the JTAG ICE is good on the AVR (I picked one up for free at one of the Atmel Seminars). The STK500 board is pretty cool - those 8 leds and switches can be used as a useful debugging tool, as can the spare RS232 port. There's also a free development IDE - Studio 4 - which has a built-in AVR simulator, and includes an assembler - all integrated with the stk500/501/502 boards etc. The avrfreaks.net and atmel.com sites have a ton of related info, and if you can pop into one of those seminars, they're well worth it.
-Pete. http://home.comcast.net/~pete.gray /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Blueeyedpop wrote:

xxx8051xxx can be used. From Cygnal, oh no,... eh Silabs. With jtag you can single step, display vars, memory registers etc. Makes debugging a lot easier.
Good luck,
Peter
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.