3pi debugger

I"m looking for a debugger for 3pi robot which has the abilities to
break points, step by step, runninh on the 3pi robot target (not a simulatorn and not only a programmer).
Please advice

You would need a jtag for an AVR microcontroller to do that
unfortunatelly it’s not a cheap thing and we don’t have acces to all needed pins through the on-board connectors :frowning: .

Hi, so any suggestions how can I get an input from the 4pi robot during run ?
Print on the LCD?
Is there any better choice ???

Yeah, you can use LCD but I would suggest using usart - that’s what I do to debug my code ;]
You can send more data this way and you can make it wireless (with Wixel or Bluetooth for example) so you can even use it when 3pi is on track :smiley:


The ATmega328P used by the 3pi does not support JTAG; rather, it uses a debug scheme called DebugWIRE that enables in-circuit debugging via the reset pin. You need a special programmer with DebugWIRE support, such as the AVR Dragon, to take advantage of this. The following thread has some more detailed information:

Since the 3pi needs to be tethered to a debugger for DebugWIRE to work, I think it has limited value for debugging a mobile robot like the 3pi. The LCD is probably a better way to go, or you might take Dzedorak’s advice and try setting up a wireless serial connection between your 3pi and computer so you can stream debug information in real time as the robot runs. One easy way to get such a connection is by using a pair of Wixels and an m3pi expansion board, which has a socket for a Wixel.

- Ben

Hello Ben and Dzedorak:

With the Wixel Programmable USB Wireless Module you mentioned, will one be able to set break points and debug on a live target? I don’t think so, but would like to confirm.
If no, is there anyway at all that one can put breakpoints and debug the 3pi? It is very difficult to code without having the power of breakpoints :).
Any recommendation will be valuable.


Hello, Dominic.

The Wixel just gives you a wireless serial link; it is not a programmer or in-circuit emulator/debugger. If you want things like breakpoints, you will need an AVR programmer that supports DebugWIRE, as I described in an earlier post in this thread.

- Ben

Hello Ben:

The post from Unable to program after failed to debug with Dragon leads me to believe that debugWire wasn’t the best way for debugging the 3pi and caused complications such as shut down.
Do you recommend debugWire for debugging?
Also, I like your support. Please feel free to advice me on other robotic kits where debugging is a straight forward jtag connection.

Thank you,

DebugWIRE can permanently disable your microcontroller if you don’t know what you’re doing, but it should be fine if you use it properly. DebugWIRE is the only debugging interface for the ATmega328p (the MCU on the 3pi and many Arduinos).

The ATmega1284P microcontroller used on the Orangutan SVP supports JTAG. The four JTAG pins are used as LCD data lines and can be accessed through the LCD header. We do not support JTAG debugging with this product, however, so you would need to figure out how to go about it from the ATmega1284P datasheet and your JTAG hardware documentation.

- Ben