ubuntu 上的 avrdude 使用 JTAGICE mkII 克隆 - 连接 ATmega1280 时出现问题 (RSP_ILLEGAL_JTAG_ID)
希望我已经为此苦苦挣扎了足够长的时间,可以在这里提出问题...
我无法将 ATmega1280 连接到更便宜的 JTAGICE mkII 版本,例如 这个。我尝试首先设置熔丝以进行 JTAG 调试。我已经按照此处所述完成了 udev 配置(并且此处)。
编辑:我可以使用 AVRStudio 通过 Windows 中的 JTAGICE 连接计算机上的硬件,所以我已经确信接线没问题。
我得到的只是:
$ avrdude -P usb -c jtagmkii -p m1280 -U hfuse:w:0x1a:m
avrdude: jtagmkII_program_enable(): bad response to enter progmode command: RSP_ILLEGAL_JTAG_ID
avrdude: jtagmkII_program_enable(): bad response to enter progmode command: RSP_ILLEGAL_JTAG_ID
avrdude: JTAGEN fuse disabled?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
我读过这篇文章可以帮助解决 JTAGICE 问题。遗憾的是,我不明白它有什么帮助,但也许你知道:
$ avarice --part atmega1280 --mkII --jtag usb --read-fuses --read-lockbits --debug
AVaRICE version 2.10, Feb 8 2010 07:22:18
Defaulting JTAG bitrate to 250 kHz.
Found JTAG ICE, serno: 070000004693
JTAG config starting.
Attempting synchronisation at bitrate 19200
command[0x01, 1]: 01
recv: 0x1b
recv: 0x00
recv: 0x00
recv: 0x1c
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 28 bytes
read: 86 01 ff 26 04 00 ff 26 04 01 07 00 00 00 46 93 4a 54 41 47 49 43 45 6d 6b 49 49 00
recv: 0xb9
recv: 0xfe
CRC OK
Got message seqno 0 (command_sequence == 0)
response: 86 01 FF 26 04 00 FF 26 04 01 07 00 00 00 46 93 4A 54 41 47 49 43 45 6D 6B 49 49 00
Found a device: JTAGICEmkII
Serial number: 07:00:00:00:46:93
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 4.38
hardware version: 0
S_MCU:
boot-loader FW version: 255
firmware version: 4.38
hardware version: 1
command[0x02, 1]: 02 03 01
recv: 0x1b
recv: 0x01
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: 80
recv: 0xcd
recv: 0x83
CRC OK
Got message seqno 1 (command_sequence == 1)
response: 80
command[0x0a, 1]: 0A 01
recv: 0x1b
recv: 0x02
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: 80
recv: 0x1d
recv: 0x09
CRC OK
Got message seqno 2 (command_sequence == 2)
response: 80
Automatic device detection:
command[0x03, 1]: 03 0E
recv: 0x1b
recv: 0xff
recv: 0xff
recv: 0x06
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 6 bytes
read: e0 fe ff 00 00 00
recv: 0x82
recv: 0x16
CRC OK
Got message seqno 65535 (command_sequence == 3)
got asynchronous event: 0xe0
recv: 0x1b
recv: 0x03
recv: 0x00
recv: 0x05
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 5 bytes
read: 81 ff ff ff ff
recv: 0x24
recv: 0x19
CRC OK
Got message seqno 3 (command_sequence == 3)
response: 81 FF FF FF FF
JTAG id = 0xFFFFFFFF : Ver = 0xf : Device = 0xffff : Manuf = 0x7ff
Reported JTAG device ID: 0xFFFF
Looking for device: atmega1280
Configured for device ID: 0x9703 atmega1280 -- FORCED with atmega1280
command[0x0c, 1]: 0C FF FF FF FF FF 3D B9 F8 00 00 00 00 00 00 00 00 FF FF 1F E0 FF 1D A9 F8 00 00 00 00 00 00 00 00 73 FF 3F FF F7 3F F7 3F F7 3F 5F 3F 37 37 36 00 00 00 00 00 FF 0F 00 00 F7 3F 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 73 FF 3F F8 F7 3F F7 3F F7 3F 5F 2F 36 36 36 00 00 00 00 00 FF 0F 00 00 F7 3F 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 57 3B 00 01 08 00 FE 00 00 36 01 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3E 3D 00 02 00 00 00 00 00 01 00 00 02 00 00 00 3C 1F 00
recv: 0x1b
recv: 0x04
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: 80
recv: 0xac
recv: 0x14
CRC OK
Got message seqno 4 (command_sequence == 4)
response: 80
JTAG config complete.
command[0x14, 1]: 14
recv: 0x1b
recv: 0x05
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xd0
recv: 0x29
CRC OK
Got message seqno 5 (command_sequence == 5)
response: A9
command[0x14, 2]: 14
recv: 0x1b
recv: 0x06
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x00
recv: 0xa3
CRC OK
Got message seqno 6 (command_sequence == 6)
response: A9
command[0x14, 3]: 14
recv: 0x1b
recv: 0x07
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xbf
recv: 0x22
CRC OK
Got message seqno 7 (command_sequence == 7)
response: A9
command[0x14, 4]: 14
recv: 0x1b
recv: 0x08
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x0d
recv: 0x93
CRC OK
Got message seqno 8 (command_sequence == 8)
response: A9
command[0x14, 5]: 14
recv: 0x1b
recv: 0x09
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xb2
recv: 0x12
CRC OK
Got message seqno 9 (command_sequence == 9)
response: A9
command[0x14, 6]: 14
recv: 0x1b
recv: 0x0a
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x62
recv: 0x98
CRC OK
Got message seqno 10 (command_sequence == 10)
response: A9
command[0x14, 7]: 14
recv: 0x1b
recv: 0x0b
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xdd
recv: 0x19
CRC OK
Got message seqno 11 (command_sequence == 11)
response: A9
command[0x14, 8]: 14
recv: 0x1b
recv: 0x0c
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xd3
recv: 0x85
CRC OK
Got message seqno 12 (command_sequence == 12)
response: A9
command[0x14, 9]: 14
recv: 0x1b
recv: 0x0d
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x6c
recv: 0x04
CRC OK
Got message seqno 13 (command_sequence == 13)
response: A9
command[0x14, 10]: 14
recv: 0x1b
recv: 0x0e
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xbc
recv: 0x8e
CRC OK
Got message seqno 14 (command_sequence == 14)
response: A9
JTAG ICE: Cannot synchronise
该设备正在我的系统上被识别
$ lsusb
Bus 002 Device 012: ID 03eb:2103 Atmel Corp. JTAG ICE mkII
它也不在任何 USB 集线器后面。我三次检查了所有连接。有什么线索吗?
Hopefully I've been struggling with this long enough to ask a question here...
I can't connect ATmega1280 with a cheaper version of JTAGICE mkII like this one. I'm trying to first set fuses for JTAG debugging. I've already done udev config as described here (and here).
EDIT: I'm able to connect my hardware on my computer via my JTAGICE in Windows using AVRStudio, so I'm already positive the wiring is ok.
All I'm getting is:
$ avrdude -P usb -c jtagmkii -p m1280 -U hfuse:w:0x1a:m
avrdude: jtagmkII_program_enable(): bad response to enter progmode command: RSP_ILLEGAL_JTAG_ID
avrdude: jtagmkII_program_enable(): bad response to enter progmode command: RSP_ILLEGAL_JTAG_ID
avrdude: JTAGEN fuse disabled?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
I've read this can help solving JTAGICE problems. Sadly, I don't understand how it could help, but maybe you do:
$ avarice --part atmega1280 --mkII --jtag usb --read-fuses --read-lockbits --debug
AVaRICE version 2.10, Feb 8 2010 07:22:18
Defaulting JTAG bitrate to 250 kHz.
Found JTAG ICE, serno: 070000004693
JTAG config starting.
Attempting synchronisation at bitrate 19200
command[0x01, 1]: 01
recv: 0x1b
recv: 0x00
recv: 0x00
recv: 0x1c
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 28 bytes
read: 86 01 ff 26 04 00 ff 26 04 01 07 00 00 00 46 93 4a 54 41 47 49 43 45 6d 6b 49 49 00
recv: 0xb9
recv: 0xfe
CRC OK
Got message seqno 0 (command_sequence == 0)
response: 86 01 FF 26 04 00 FF 26 04 01 07 00 00 00 46 93 4A 54 41 47 49 43 45 6D 6B 49 49 00
Found a device: JTAGICEmkII
Serial number: 07:00:00:00:46:93
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 4.38
hardware version: 0
S_MCU:
boot-loader FW version: 255
firmware version: 4.38
hardware version: 1
command[0x02, 1]: 02 03 01
recv: 0x1b
recv: 0x01
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: 80
recv: 0xcd
recv: 0x83
CRC OK
Got message seqno 1 (command_sequence == 1)
response: 80
command[0x0a, 1]: 0A 01
recv: 0x1b
recv: 0x02
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: 80
recv: 0x1d
recv: 0x09
CRC OK
Got message seqno 2 (command_sequence == 2)
response: 80
Automatic device detection:
command[0x03, 1]: 03 0E
recv: 0x1b
recv: 0xff
recv: 0xff
recv: 0x06
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 6 bytes
read: e0 fe ff 00 00 00
recv: 0x82
recv: 0x16
CRC OK
Got message seqno 65535 (command_sequence == 3)
got asynchronous event: 0xe0
recv: 0x1b
recv: 0x03
recv: 0x00
recv: 0x05
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 5 bytes
read: 81 ff ff ff ff
recv: 0x24
recv: 0x19
CRC OK
Got message seqno 3 (command_sequence == 3)
response: 81 FF FF FF FF
JTAG id = 0xFFFFFFFF : Ver = 0xf : Device = 0xffff : Manuf = 0x7ff
Reported JTAG device ID: 0xFFFF
Looking for device: atmega1280
Configured for device ID: 0x9703 atmega1280 -- FORCED with atmega1280
command[0x0c, 1]: 0C FF FF FF FF FF 3D B9 F8 00 00 00 00 00 00 00 00 FF FF 1F E0 FF 1D A9 F8 00 00 00 00 00 00 00 00 73 FF 3F FF F7 3F F7 3F F7 3F 5F 3F 37 37 36 00 00 00 00 00 FF 0F 00 00 F7 3F 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 73 FF 3F F8 F7 3F F7 3F F7 3F 5F 2F 36 36 36 00 00 00 00 00 FF 0F 00 00 F7 3F 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 57 3B 00 01 08 00 FE 00 00 36 01 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3E 3D 00 02 00 00 00 00 00 01 00 00 02 00 00 00 3C 1F 00
recv: 0x1b
recv: 0x04
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: 80
recv: 0xac
recv: 0x14
CRC OK
Got message seqno 4 (command_sequence == 4)
response: 80
JTAG config complete.
command[0x14, 1]: 14
recv: 0x1b
recv: 0x05
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xd0
recv: 0x29
CRC OK
Got message seqno 5 (command_sequence == 5)
response: A9
command[0x14, 2]: 14
recv: 0x1b
recv: 0x06
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x00
recv: 0xa3
CRC OK
Got message seqno 6 (command_sequence == 6)
response: A9
command[0x14, 3]: 14
recv: 0x1b
recv: 0x07
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xbf
recv: 0x22
CRC OK
Got message seqno 7 (command_sequence == 7)
response: A9
command[0x14, 4]: 14
recv: 0x1b
recv: 0x08
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x0d
recv: 0x93
CRC OK
Got message seqno 8 (command_sequence == 8)
response: A9
command[0x14, 5]: 14
recv: 0x1b
recv: 0x09
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xb2
recv: 0x12
CRC OK
Got message seqno 9 (command_sequence == 9)
response: A9
command[0x14, 6]: 14
recv: 0x1b
recv: 0x0a
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x62
recv: 0x98
CRC OK
Got message seqno 10 (command_sequence == 10)
response: A9
command[0x14, 7]: 14
recv: 0x1b
recv: 0x0b
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xdd
recv: 0x19
CRC OK
Got message seqno 11 (command_sequence == 11)
response: A9
command[0x14, 8]: 14
recv: 0x1b
recv: 0x0c
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xd3
recv: 0x85
CRC OK
Got message seqno 12 (command_sequence == 12)
response: A9
command[0x14, 9]: 14
recv: 0x1b
recv: 0x0d
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0x6c
recv: 0x04
CRC OK
Got message seqno 13 (command_sequence == 13)
response: A9
command[0x14, 10]: 14
recv: 0x1b
recv: 0x0e
recv: 0x00
recv: 0x01
recv: 0x00
recv: 0x00
recv: 0x00
recv: 0x0e
sDATA: reading 1 bytes
read: a9
recv: 0xbc
recv: 0x8e
CRC OK
Got message seqno 14 (command_sequence == 14)
response: A9
JTAG ICE: Cannot synchronise
The device is being recognized on my system
$ lsusb
Bus 002 Device 012: ID 03eb:2103 Atmel Corp. JTAG ICE mkII
It's also not behind any USB hub. I triple checked all connections. Any clues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
avrice 与设备的连接正常,但设备似乎未与目标设备通信。您确定已连接并开机吗?
本文档可以帮助您解读 jtag 单元的响应内容。
avrice is connecting to the unit fine, but the unit doesn't seem to be communicating with the target device. Are you sure it is connected and powered on?
This document may help you decipher what the jtag unit is responding.