I bought the 3Pi and programmer combo and have just started playing with it. I have been able to program the samples into the 3Pi using AVR Studio but I have not been able to debug. Is it possible to debug with the programmer or do I need something else like a JTAG adapter?
I recommend you use AVR Studio’s simulator to debug your code, which I find is usually sufficient for my debugging needs. The ATmega168 on the 3pi does not support JTAG, though it does support in-circuit debugging via debugWire. You will need a programmer capable of debugWire it make use of this, however, as the Orangutan USB programmer is strictly an AVR ISP programmer. You will need to make some modifications to your 3pi before you can get debugWire working, and I only recommend you use it if you know what you’re doing as using it incorrectly can make your 3pi unresponsive to standard ISP. If you do a search for “debugWire” on these forums you can find a bit more information, and I can provide more information about using debugWire on the 3pi if this is something you want to pursue.
I need some hints for the debugging in AVR Studio 5 …
as soon some special HW like LCD and Sensors are called I guess the AVR studio has no chance, is´nt it so?
Could it be a way out to add some simulator/debuging code which is activated with #ifdef debug (or so)
and than giving back some input values expected from the HW or …redirect LCD to a console printf …
of the studio?
Hello. Yes, you can probably use the preprocessor to replace every function in our library that waits for or reads from external hardware with a different function that doesn’t.