当我发出这个命令时,我得到了这个输出:
$ sudo openocd -f board/MyBuspirate.cfg -f board/linksys-wrt54gl.cfg
Open On-Chip Debugger 0.10.0+dev-00092-g77189db (2017-02-25-13:44)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: bcm5352e.cpu tap/device found: 0xe09a91ff (mfg: 0x0ff (<invalid>), part: 0x09a9, ver: 0xe)
Warn : JTAG tap: bcm5352e.cpu UNEXPECTED: 0xe09a91ff (mfg: 0x0ff (<invalid>), part: 0x09a9, ver: 0xe)
Error: JTAG tap: bcm5352e.cpu expected 1 of 1: 0x0535217f (mfg: 0x0bf (Broadcom), part: 0x5352, ver: 0x0)
Warn : Unexpected idcode after end of chain: 544 0x7fffffff
Warn : Unexpected idcode after end of chain: 576 0xfff82648
Error: double-check your JTAG setup (interface, speed, ...)
Error: Trying to use configured scan chain anyway...
Error: bcm5352e.cpu: IR capture error; saw 0xfe not 0x1
Warn : Bypassing JTAG setup events due to errors
^CInfo : Shutting down buspirate.
Info : Buspirate switched to normal mode
其中,board/MyBuspirate.cfg:
buspirate_port /dev/ttyUSB0
buspirate_vreg 0
buspirate_mode normal
buspirate_pullup 1
buspirate_speed normal
reset_config srst_only
和board/linksys-wrt54gl.cfg:
# Linksys WRT54GL v1.1
#
source [find target/bcm5352e.cfg]
set partition_list {
CFE { Bootloader 0x1c000000 0x00040000 }
firmware { "Kernel+rootfs" 0x1c040000 0x003b0000 }
nvram { "Config space" 0x1c3f0000 0x00010000 }
}
# External 4MB NOR Flash (Intel TE28F320C3BD90 or similar)
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME cfi 0x1c000000 0x00400000 2 2 $_TARGETNAME
和来源,target/bcm5352e.cfg,它指的是:
set _CHIPNAME bcm5352e
set _CPUID 0x0535217f
jtag newtap $_CHIPNAME cpu -irlen 8 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME mips_m4k -endian little -chain-position $_TARGETNAME
gdb_memory_map disable
$_TARGETNAME configure -event gdb-attach {
reset
halt
}
我希望能够调试JTAG tap: bcm5352e.cpu我使用gdb. 我能够连接到 openocd 侦听的 gdb 服务器,但是查看寄存器和指令指针等是在说垃圾。
我不确定 Bus Pirate 是否按预期工作并且处于 JTAG 模式?我假设是的,因为在输出中它说:Info : only one transport option; autoselect 'jtag'。
您对为什么我收到错误、意外 ID 代码有任何想法吗?并且非常感谢其他要点,提示和技巧?