I have a jtag mk 2, and freshly recompiled avrdude 5.11. Hardware is a bare part on a breadboard with all 6 ISP lines connected to the jtag mk2, no additional hardware on the reset line at all, clean power, etc etc. Setup works flawlessly in the debugwire mode, and did work flawlessly in ISP mode until I programmed DWEN.
I understand I'm supposed to be able to invoke avrdude with -c jtag2isp twice and as part of the failure first time, it forces the part into an ISP compatible mode (only until the next power cycle, unless you modify the fuse bits.)
Sadly, this isn't working as advertised for me. If possible, I would like to avoid high voltage mode on my stk500, since that's currently wired for a different project. Using AVRStudio is equally inconvenient. Besides, this _should_ work, and I'd like to understand why it does not.
Here is the output from two successive invocations of "avrdude -p atmega48 -P usb -c jtag2isp -vvvvv", perhaps someone who knows more of the protocol can tell me what's going on (apologies in advance if gmail/mailing list mangles this badly):
avrdude: Version 5.11, compiled on Apr 27 2012 at 22:13:53
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/usr/local/etc/avrdude.conf"
User configuration file is "/home/andyw/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : jtag2isp
avrdude: stk500v2_jtagmkII_open()
avrdude: usbdev_open(): Found JTAGICE mkII, serno: 00B000001C73
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [1c]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [86] . [01] . [ff] . [1c] . [05] . [00] . [ff] . [1c] . [05] . [01] . [00] . [b0] . [00] . [00] . [1c] s [73] J [4a] T [54] A [41] G [47] I [49] C [43] E [45] m [6d] k [6b] I [49] I [49] . [00]
avrdude: Recv: . [09]
avrdude: Recv: . [c4]
avrdude: jtagmkII_recv(): Got message seqno 0 (command_sequence == 0)
Raw message:
0x860x010xff0x1c0x050x000xff0x1c0x050x010x000xb00x000x000x1c0x73
0x4a0x540x410x470x490x430x450x6d0x6b0x490x490x00
Sign-on succeeded
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 5.28
hardware version: 0
S_MCU:
boot-loader FW version: 255
firmware version: 5.28
hardware version: 1
Serial number: 00:b0:00:00:1c:73
Device ID: JTAGICEmkII
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [01] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [03] . [89] f [66]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [a0]
avrdude: Recv: . [cf]
avrdude: Recv: . [a2]
avrdude: jtagmkII_recv(): Got message seqno 1 (command_sequence == 1)
Raw message:
0xa0
FAILED
avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: jtagmkII_getsync(): ISP activation failed, trying debugWire
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [02] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [00] { [7b] [20]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [02]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [80]
avrdude: Recv: . [1d]
avrdude: Recv: . [09]
avrdude: jtagmkII_recv(): Got message seqno 2 (command_sequence == 2)
Raw message:
0x80
OK
avrdude: jtagmkII_reset(): Sending reset command:
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [03] . [00] . [02] . [00] . [00] . [00] . [0e] . [0b] . [04] . [be] . [00]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [80]
avrdude: Recv: . [a2]
avrdude: Recv: . [88]
avrdude: jtagmkII_recv(): Got message seqno 3 (command_sequence == 3)
Raw message:
0x80
OK
avrdude: Target prepared for ISP, signed off.
avrdude: Please restart avrdude without power-cycling the target.
avrdude: stk500v2_jtagmkII_close()
avrdude: jtagmkII_close()
avrdude: jtagmkII_close(): Sending sign-off command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [04] . [00] . [01] . [00] . [00] . [00] . [0e] . [00] . [a4] . [90]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [04]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [80]
avrdude: Recv: . [ac]
avrdude: Recv: . [14]
avrdude: jtagmkII_recv(): Got message seqno 4 (command_sequence == 4)
Raw message:
0x80
OK
avrdude done. Thank you.
avrdude: Version 5.11, compiled on Apr 27 2012 at 22:13:53
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/usr/local/etc/avrdude.conf"
User configuration file is "/home/andyw/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : jtag2isp
avrdude: stk500v2_jtagmkII_open()
avrdude: usbdev_open(): Found JTAGICE mkII, serno: 00B000001C73
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: jtagmkII_getsync()
avrdude: jtagmkII_getsync(): Sending sign-on command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [00] . [00] . [01] . [00] . [00] . [00] . [0e] . [01] . [f3] . [97]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [1c]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [86] . [01] . [ff] . [1c] . [05] . [00] . [ff] . [1c] . [05] . [01] . [00] . [b0] . [00] . [00] . [1c] s [73] J [4a] T [54] A [41] G [47] I [49] C [43] E [45] m [6d] k [6b] I [49] I [49] . [00]
avrdude: Recv: . [09]
avrdude: Recv: . [c4]
avrdude: jtagmkII_recv(): Got message seqno 0 (command_sequence == 0)
Raw message:
0x860x010xff0x1c0x050x000xff0x1c0x050x010x000xb00x000x000x1c0x73
0x4a0x540x410x470x490x430x450x6d0x6b0x490x490x00
Sign-on succeeded
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 5.28
hardware version: 0
S_MCU:
boot-loader FW version: 255
firmware version: 5.28
hardware version: 1
Serial number: 00:b0:00:00:1c:73
Device ID: JTAGICEmkII
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [01] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [03] . [89] f [66]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [a0]
avrdude: Recv: . [cf]
avrdude: Recv: . [a2]
avrdude: jtagmkII_recv(): Got message seqno 1 (command_sequence == 1)
Raw message:
0xa0
FAILED
avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED
avrdude: jtagmkII_getsync(): ISP activation failed, trying debugWire
avrdude: jtagmkII_setparm()
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes):
avrdude: jtagmkII_send(): sending 3 bytes
avrdude: Sent: . [1b] . [02] . [00] . [03] . [00] . [00] . [00] . [0e] . [02] . [03] . [00] { [7b] [20]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [02]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [80]
avrdude: Recv: . [1d]
avrdude: Recv: . [09]
avrdude: jtagmkII_recv(): Got message seqno 2 (command_sequence == 2)
Raw message:
0x80
OK
avrdude: jtagmkII_reset(): Sending reset command:
avrdude: jtagmkII_send(): sending 2 bytes
avrdude: Sent: . [1b] . [03] . [00] . [02] . [00] . [00] . [00] . [0e] . [0b] . [04] . [be] . [00]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [03]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [80]
avrdude: Recv: . [a2]
avrdude: Recv: . [88]
avrdude: jtagmkII_recv(): Got message seqno 3 (command_sequence == 3)
Raw message:
0x80
OK
avrdude: Target prepared for ISP, signed off.
avrdude: Please restart avrdude without power-cycling the target.
avrdude: stk500v2_jtagmkII_close()
avrdude: jtagmkII_close()
avrdude: jtagmkII_close(): Sending sign-off command:
avrdude: jtagmkII_send(): sending 1 bytes
avrdude: Sent: . [1b] . [04] . [00] . [01] . [00] . [00] . [00] . [0e] . [00] . [a4] . [90]
avrdude: jtagmkII_recv():
avrdude: Recv: . [1b]
avrdude: Recv: . [04]
avrdude: Recv: . [00]
avrdude: Recv: . [01]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [00]
avrdude: Recv: . [0e]
avrdude: Recv: . [80]
avrdude: Recv: . [ac]
avrdude: Recv: . [14]
avrdude: jtagmkII_recv(): Got message seqno 4 (command_sequence == 4)
Raw message:
0x80
OK
avrdude done. Thank you.
Regards,
--
Andy