Unrelated to my other post, I would like some help with JTAG debugging of a Leonardo.
First, I had to build a JTAG adapter for the Leonardo. After reading the datasheet for the Atmega32u4, the Olimexino32u4 (Leonardo clone), and the JTAGICE3, I assembled a stripboard adapter as shown in the attachments. I think I did it right, because I can read and re-program the Arduino with no problems. However, all attempts to start a debug session are failing. Can someone help me with this?
I have the JTAGEN fuse programmed, and am uploading a simple blink program. When I press (start debugging and break), the chip gets programmed, followed by a 5-10 second pause, followed by an error message. At that point the blink program begins running as it should (I can program different durations to verify that programming is working). The output window of AS6 contains only this:
21:21:03: [ERROR] , ModuleName: TCF (TCF command: Processes:getContext failed.) 21:21:03: [ERROR] Failed to start debugging session., ModuleName: TCF (TCF command: Processes:launch failed.)