openjtag链接arm开发板出问题了求教

xianjian_x 2014-08-18 09:00:53
用 openjtag 链接mini2440开发板可以调试一些裸机程序,或者调试内核,刚开始时还很好用。但后来突然不能用了现象如下:

有时候会出现 openocd 无法正常启动 如下所示:
xianjian@xianjian-Lenovo-M490:~/work/arm/gnu-ucos$ ./openocd.sh 
Open On-Chip Debugger 0.6.0-dev-00441-g30a4271 (2012-01-05-06:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
6000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : clock speed 6000 kHz
Info : JTAG tap: s3c2440.cpu tap/device found: 0x0032409d (mfg: 0x04e, part: 0x0324, ver: 0x0)
Error: s3c2440.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : s3c2440.cpu: hardware has 2 breakpoint/watchpoint units


xianjian@xianjian-Lenovo-M490:~/work/arm/gnu-ucos$ ./openocd.sh
Open On-Chip Debugger 0.6.0-dev-00441-g30a4271 (2012-01-05-06:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
6000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : clock speed 6000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: s3c2440.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : s3c2440.cpu: hardware has 2 breakpoint/watchpoint units


如果 openocd 启动正常
xianjian@xianjian-Lenovo-M490:~/work/arm/gnu-ucos$ ./openocd.sh 
Open On-Chip Debugger 0.6.0-dev-00441-g30a4271 (2012-01-05-06:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
6000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : clock speed 6000 kHz
Info : JTAG tap: s3c2440.cpu tap/device found: 0x0032409d (mfg: 0x04e, part: 0x0324, ver: 0x0)
Info : Embedded ICE version 2
Info : s3c2440.cpu: hardware has 2 breakpoint/watchpoint units


另开一个终端 halt 超时:
xianjian@xianjian-Lenovo-M490:~/work/arm/gnu-ucos$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> poll
background polling: on
TAP: s3c2440.cpu (enabled)
target state: running
> halt
Halt timed out, wake up GDB.
timed out while waiting for target halted
in procedure 'halt'
>





openocd 端显示:
Info : accepting 'telnet' connection from 4444
background polling: on
TAP: s3c2440.cpu (enabled)
target state: running
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
in procedure 'halt

这个在我的 mini2440板子上无论如何也无法halt了。





上面涉及到的 配置文件如下
openocd.sh :
openocd -f /etc/openocd/interface/openjtag.cfg -f /etc/openocd/target/samsung_s3c2440.cfg


$ cat /etc/openocd/interface/openjtag.cfg
#
# 100ASK OpenJTAG
#
# http://www.100ask.net
#

interface ft2232
ft2232_device_desc "USB<=>JTAG&RS232"
ft2232_layout jtagkey
ft2232_vid_pid 0x1457 0x5118
jtag_khz 6000



$ cat /etc/openocd/target/samsung_s3c2440.cfg
# Target configuration for the Samsung 2440 system on chip
# Tested on a S3C2440 Evaluation board by keesj
# Processor : ARM920Tid(wb) rev 0 (v4l)
# Info: JTAG tap: s3c2440.cpu tap/device found: 0x0032409d (Manufacturer: 0x04e, Part: 0x0324, Version: 0x0)

if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME s3c2440
}

if { [info exists ENDIAN] } {
set _ENDIAN $ENDIAN
} else {
# this defaults to a bigendian
set _ENDIAN little
}

if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
set _CPUTAPID 0x0032409d
}

#jtag scan chain
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm920t

$_TARGETNAME configure -work-area-phys 0x200000 -work-area-size 0x4000 -work-area-backup 1

#reset configuration
reset_config trst_and_srst




后来我又用一块 tq2440 开发板,跟 mini2440 一样也是s3c2440 处理器的, 同样情况下,openjtag 可以很好工作。!
可以清楚的看到是板子出了问题,但是哪根线有问题了呢?不解!


...全文
3084 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
laojiazaihainandao 2015-01-13
  • 打赏
  • 举报
回复
我的也是出现过这种问题,应该是连接到开发板和openjtag之间的连接线坏了,我换一条线就没有以下的错误了。换一条就好了! 我是换了一条开发板与openjtag的连线之后以下的信息就消失了: Error: JTAG scan chain interrogation failed: all zeroes Error: Check JTAG interface, timings, target power, etc. Error: Trying to use configured scan chain anyway... Error: s3c2440.cpu: IR capture error; saw 0x00 not 0x01 Warn : Bypassing JTAG setup events due to errors

2,432

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 其他硬件开发
社区管理员
  • 其他硬件开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧