标签:
git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
输出版本信息
openocd -v
Open On-Chip Debugger 0.9.0-dev-00251-g1fa4c72 (2015-01-30-19:44)
Licensed under GNU GPL v2参考百问网的配置修改
# # 100ASK OpenJTAG # # http://www.100ask.net # # modified by xnus 2015 # interface ft2232 ft2232_device_desc "USB<=>JTAG&RS232" ft2232_layout jtagkey ft2232_vid_pid 0x1457 0x5118 # 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 { # force an error till we get a good number set _CPUTAPID 0x0032409d } #jtag scan chain jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0x0f -expected-id $_CPUTAPID # #jtag_rclk 3000 adapter_khz 1234 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 arm7_9 fast_memory_access enable #reset configuration reset_config trst_and_srst #Flash CFG<openocd.pdf P[74~] #flash bank name driver base size chip_width bus_width target [driver_options] #usage: flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target> #flash bank bank_id driver_name base_address size_bytes chip_width_bytes bus_width_bytes target [driver_options ...] flash bank 0 cfi 0x0 0x200000 2 2 $_TARGETNAME #NAND CFG <openocd.pdf P[88~92]> #nand device name driver target [ configparams... ] nand device 0 s3c2440 $_TARGETNAME
将开发板连接的OpenJTAG的USB端口接入PC,终端输入openocd
xnus@xnus-P43E:~$openocd
Open On-Chip Debugger 0.8.0 (2015-01-30-21:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect ‘jtag‘
adapter speed: 1234 kHz
fast memory access is enabled
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
Warn : Using DEPRECATED interface driver ‘ft2232‘
Info : Consider using the ‘ftdi‘ interface driver, with configuration files in interface/ftdi/...
Info : clock speed 1200 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
xnus@xnus-P43E:~$ telnet localhost 4444
> resume 0x0
可以看到灯开始闪烁了(注意,应设置为NAND启动)
GOODLUCK
在Ubutu14.04下,如何用OpenJTAG+OPENOCD烧写程序
标签:
原文地址:http://blog.csdn.net/oimchuan/article/details/43304945