【救命求助】K3 openocd连接一直失败

  1. 参考文档链接
    SpacemiT

  2. 按照文档去掉J-Link跳线帽。

  3. Linux系统。拷贝60-openocd.rules到/etc/udev/rules.d并刷新udev规则。

  4. 运行脚本k3.sh,连接失败;运行其他k3-xxx.sh脚本,现象一样。
    报错log如下(两次区别是一次连了J-Link的Vref脚,一次没连,结果都是失败):

> test@test-ZhaoYang-X5-14-IRL:~/K3/spacemit-openocd-linux-V1.1.2/bin$ ./k3.sh
> 
> Open On-Chip Debugger 0.12.0+dev-g57f52fa (2026-06-10-07:54)
> 
> Licensed under GNU GPL v2
> 
> For bug reports, read
> 
> http://openocd.org/doc/doxygen/bugs.html
> 
> 8000
> 
> 0
> 
> acpu
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0
> 
> 0
> 
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> 
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> 
> 0 1 2 3
> 
> sbawrite32
> 
> Info : [k3.x100.0] Hardware thread awareness created
> 
> Info : [k3.x100.4] Hardware thread awareness created
> 
> Info : [k3.a100.8] Hardware thread awareness created
> 
> Info : [k3.a100.12] Hardware thread awareness created
> 
> Info : J-Link Pro V4 compiled Sep 22 2029 15:00:37
> 
> Info : Hardware version: 11.00
> 
> Info : VTarget = 3.260 V
> 
> Info : clock speed 2000 kHz
> 
> Error: JTAG scan chain interrogation failed: all ones
> 
> Error: Check JTAG interface, timings, target power, etc.
> 
> Error: Trying to use configured scan chain anyway...
> 
> Error: post.unknown: IR capture error; saw 0x1ff not 0x1
> 
> Warn : Bypassing JTAG setup events due to errors
> 
> Info : [k3.x100.0] starting gdb server on 1024
> 
> Info : Listening on port 1024 for gdb connections
> 
> Error: [k3.x100.0] set_group is not implemented for this target.
> 
> scripts/spacemit-k3.cfg:145: Error:
> 
> Traceback (most recent call last):
> 
> File "scripts/spacemit-k3.cfg", line 145, in script
> 
> {k3.x100.0 riscv set_group} halt_group 0 trigger 0
> 
> Error: [k3.x100.0] Unsupported DTM version: -1
> 
> Error: [k3.x100.0] Could not identify target type.
> 
> Error: [k3.x100.1] Unsupported DTM version: -1
> 
> Error: [k3.x100.1] Could not identify target type.
> 
> Error: [k3.x100.2] Unsupported DTM version: -1
> 
> Error: [k3.x100.2] Could not identify target type.
> 
> Error: [k3.x100.3] Unsupported DTM version: -1
> 
> Error: [k3.x100.3] Could not identify target type.
> 
> Error: [k3.x100.4] Unsupported DTM version: -1
> 
> Error: [k3.x100.4] Could not identify target type.
> 
> Error: [k3.x100.5] Unsupported DTM version: -1
> 
> Error: [k3.x100.5] Could not identify target type.
> 
> Error: [k3.x100.6] Unsupported DTM version: -1
> 
> Error: [k3.x100.6] Could not identify target type.
> 
> Error: [k3.x100.7] Unsupported DTM version: -1
> 
> Error: [k3.x100.7] Could not identify target type.
> 
> Error: [k3.a100.8] Unsupported DTM version: -1
> 
> Error: [k3.a100.8] Could not identify target type.
> 
> Error: [k3.a100.9] Unsupported DTM version: -1
> 
> Error: [k3.a100.9] Could not identify target type.
> 
> Error: [k3.a100.10] Unsupported DTM version: -1
> 
> Error: [k3.a100.10] Could not identify target type.
> 
> Error: [k3.a100.11] Unsupported DTM version: -1
> 
> Error: [k3.a100.11] Could not identify target type.
> 
> Error: [k3.a100.12] Unsupported DTM version: -1
> 
> Error: [k3.a100.12] Could not identify target type.
> 
> Error: [k3.a100.13] Unsupported DTM version: -1
> 
> Error: [k3.a100.13] Could not identify target type.
> 
> Error: [k3.a100.14] Unsupported DTM version: -1
> 
> Error: [k3.a100.14] Could not identify target type.
> 
> Error: [k3.a100.15] Unsupported DTM version: -1
> 
> Error: [k3.a100.15] Could not identify target type.
> 
> test@test-ZhaoYang-X5-14-IRL:~/K3/spacemit-openocd-linux-V1.1.2/bin$ ./k3.sh
> 
> Open On-Chip Debugger 0.12.0+dev-g57f52fa (2026-06-10-07:54)
> 
> Licensed under GNU GPL v2
> 
> For bug reports, read
> 
> http://openocd.org/doc/doxygen/bugs.html
> 
> 8000
> 
> 0
> 
> acpu
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0 1 2 3
> 
> 0
> 
> 0
> 
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> 
> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> 
> 0 1 2 3
> 
> sbawrite32
> 
> Info : [k3.x100.0] Hardware thread awareness created
> 
> Info : [k3.x100.4] Hardware thread awareness created
> 
> Info : [k3.a100.8] Hardware thread awareness created
> 
> Info : [k3.a100.12] Hardware thread awareness created
> 
> Info : J-Link Pro V4 compiled Sep 22 2029 15:00:37
> 
> Info : Hardware version: 11.00
> 
> Info : VTarget = 0.000 V
> 
> Info : clock speed 2000 kHz
> 
> Error: JTAG scan chain interrogation failed: all ones
> 
> Error: Check JTAG interface, timings, target power, etc.
> 
> Error: Trying to use configured scan chain anyway...
> 
> Error: post.unknown: IR capture error; saw 0x1ff not 0x1
> 
> Warn : Bypassing JTAG setup events due to errors
> 
> Info : [k3.x100.0] starting gdb server on 1024
> 
> Info : Listening on port 1024 for gdb connections
> 
> Error: [k3.x100.0] set_group is not implemented for this target.
> 
> scripts/spacemit-k3.cfg:145: Error:
> 
> Traceback (most recent call last):
> 
> File "scripts/spacemit-k3.cfg", line 145, in script
> 
> {k3.x100.0 riscv set_group} halt_group 0 trigger 0
> 
> Error: [k3.x100.0] Unsupported DTM version: -1
> 
> Error: [k3.x100.0] Could not identify target type.
> 
> Error: [k3.x100.1] Unsupported DTM version: -1
> 
> Error: [k3.x100.1] Could not identify target type.
> 
> Error: [k3.x100.2] Unsupported DTM version: -1
> 
> Error: [k3.x100.2] Could not identify target type.
> 
> Error: [k3.x100.3] Unsupported DTM version: -1
> 
> Error: [k3.x100.3] Could not identify target type.
> 
> Error: [k3.x100.4] Unsupported DTM version: -1
> 
> Error: [k3.x100.4] Could not identify target type.
> 
> Error: [k3.x100.5] Unsupported DTM version: -1
> 
> Error: [k3.x100.5] Could not identify target type.
> 
> Error: [k3.x100.6] Unsupported DTM version: -1
> 
> Error: [k3.x100.6] Could not identify target type.
> 
> Error: [k3.x100.7] Unsupported DTM version: -1
> 
> Error: [k3.x100.7] Could not identify target type.
> 
> Error: [k3.a100.8] Unsupported DTM version: -1
> 
> Error: [k3.a100.8] Could not identify target type.
> 
> Error: [k3.a100.9] Unsupported DTM version: -1
> 
> Error: [k3.a100.9] Could not identify target type.
> 
> Error: [k3.a100.10] Unsupported DTM version: -1
> 
> Error: [k3.a100.10] Could not identify target type.
> 
> Error: [k3.a100.11] Unsupported DTM version: -1
> 
> Error: [k3.a100.11] Could not identify target type.
> 
> Error: [k3.a100.12] Unsupported DTM version: -1
> 
> Error: [k3.a100.12] Could not identify target type.
> 
> Error: [k3.a100.13] Unsupported DTM version: -1
> 
> Error: [k3.a100.13] Could not identify target type.
> 
> Error: [k3.a100.14] Unsupported DTM version: -1
> 
> Error: [k3.a100.14] Could not identify target type.
> 
> Error: [k3.a100.15] Unsupported DTM version: -1
> 
> Error: [k3.a100.15] Could not identify target type.
  1. 我把测试环境拍了几张照片,请各位大佬帮忙检查一下。

整体环境

用飞线连接板端Pri JTAG

J-Link的GND和板端UART的GND连接

J-Link端连线(角度1)

J-Link端连线(角度2)