韦东山Linux嵌入式课程社区
直播中

刘溪

7年用户 155经验值
私信 关注

请问S3C4510的openocd.cfg该怎么样写?

求助,S3C4510的openocd.cfg该怎样写????

各位大侠,小弟今天收到了100问网的OpenJTAG。光盘里面只有2440的openocd.cfg。我试着改了这个文件以适合s3c4510。SparkFun也找过了。都未遂。郁闷,问问大家知不知道怎么写这个??我是用的ubuntu9.04。
我的openocd.cfg是:
-----------------------------------------------------
daemon configuration
telnet_port 4444

gdb_port 3333


#interface
interface ft2232

jtag_speed 0

ft2232_vid_pid 0x1457 0x5118

#ft2232_layout "jtagkey_prototype_v1"
ft2232_layout "jtagkey_prototype_v1"
ft2232_device_desc "USB<=>JTAG&RS232"

#use combined on interfaces or targets that can't set TRST/SRST
separately
reset_config srst_only srst_pulls_trst

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe


#target configuration
daemon_startup reset

#target
#target ARM7tdmi
target arm7tdmi little reset_halt 0 arm7tdmi-s_r4

run_and_halt_time 0 30
-----------------------------------------------------
输出是:
-----------------------------------------------------
Info:    options.c:50 configuration_output_handler(): jtag_speed: 0, 0
Info:    options.c:50 configuration_output_handler(): Command separately not found
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x1f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x1)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x07070fff (Manufacturer: 0x7ff, Part: 0x7070, Version: 0x0)
Error:   jtag.c:1399 jtag_examine_chain(): number of discovered devices in JTAG chain (20) doesn't match configuration (1)
Error:   jtag.c:1400 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, ...)
Error:   jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway...
Error:   embeddedice.c:191 embeddedice_build_reg_cache(): unknown EmbeddedICE version (comms ctrl: 0xf93cfeb7)
-----------------------------------------------------

回帖(5)

杨怡

2019-11-4 09:06:50
试试这个:
举报

李敏

2019-11-4 09:20:08
#fast enable
telnet_port 4444
gdb_port 3333
interface ft2232
jtag_speed 0
ft2232_vid_pid 0x1457 0x5118
ft2232_layout "jtagkey"
#jtag_device 4 0x1 0xf 0xe
#nand device s3c2440 0
ft2232_device_desc "USB<=>JTAG&RS232 A"

#debug_level 3
# Target configuration for the Samsung 2440 system on chip
# Tested on a S3C2440 Evaluation board
# Processor       : ARM920Tid(wb) rev 0 (v4l)
# Info:   JTAG device found: 0x0032409d (Manufacturer: 0x04e, Part: 0x0324, Version: 0x0)
# [Duane Ellis 27/nov/2008: Above 0x0032409d appears to be copy/paste from other places]
# [and I do not believe it to be accurate, hence the 0xffffffff below]

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

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

if { [info exists CPUTAPID ] } {
   set _CPUTAPID $CPUTAPID
} else {
  # force an error till we get a good number
   set _CPUTAPID 0x07926f0f
}

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

set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm926ejs
$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x200000 -work-area-size 0x4000 -work-area-backup 1

#reset configuration
reset_config trst_and_srst
举报

刘宇

2019-11-4 09:35:40
有问题请联系我QQ
举报

李子跃

2019-11-4 09:42:24
南方兄,谢谢你的回复,我在“http://openfacts.berlios.de/inde ... enOCD_configuration”上找到了答案,我写了一个s3c4510的opencfg.cfg,已经正常运行了,可以没有flash的配置,因为我还不太会。
除了Philips LPC2000系列的,其他的ARM7在小端情况下都是可以用了。当然,你的OpenJTAG是“jtagkey_prototype_v1”的版本,比如100问网的,其他的OpenJTAG要做少量修改。
----------------------------------------
#Daemon configuration
telnet_port 4444
gdb_port 3333
daemon_startup attach


#JTAG interface configuration
interface ft2232
jtag_speed 0
reset_config trst_and_srst
jtag_device 4 0x1 0xf 0xe
jtag_nsrst_delay 100
jtag_ntrst_delay 50

ft2232_vid_pid 0x1457 0x5118
ft2232_layout "jtagkey_prototype_v1"
#ft2232_layout "jtagkey"
ft2232_device_desc "USB<=>JTAG&RS232"

#Target configuration
target arm7tdmi little reset_run 0 arm7tdmi
run_and_halt_time 0 50
----------------------------------------
打印的信息是:
----------------------------------------
root@ubuntu:~/Documents/Project/Exam/Led/0000/Led/OpenOcd# openocd
Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-09:26) svn:717
Info:    options.c:50 configuration_output_handler(): jtag_speed: 0, 0
Info:    jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x1f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x1)
Info:    server.c:78 add_connection(): accepting 'telnet' connection from 0
User:    target.c:957 target_arch_state(): target state: halted
User:    armv4_5.c:307 armv4_5_arch_state(): target halted in ARM state due to debug request, current mode: Supervisor
cpsr: 0x60000013 pc: 0x00015dec
User:    target.c:957 target_arch_state(): target state: running
举报

更多回帖

发帖
×
20
完善资料,
赚取积分