OpenOCD Config Files

From eLinux.org
Revision as of 00:44, 21 April 2012 by Wmat (Talk | contribs) (Removing FS3 references.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page contains OpenOCD config files created by TinCanTools. OpenOCD reads config files to configure itself for different hardware. OpenOCD is packaged with config files for many devices; the files on this page add support for new devices or replacements for obsolete config files.


Installing Config Files

To download a config file from this page, right-click the link and select "Save As." Save the file somewhere in OpenOCD's search path. If you're not sure what directories OpenOCD searches and you compiled OpenOCD yourself, save the config file to the same directory as your OpenOCD executable. If you have installed the OpenOCD Ubuntu Package, save the config file to \usr\local\share\openocd\scripts.

You can run OpenOCD with the script like this:

openocd -f yourconfigfile.cfg -f yourotherfile.cfg

By convention, config files for processors go in a folder called /target, files for target boards go in /board, and files for interface devices go in /interface. Many config files for boards search in \target for the file for their processor, so always save files for processor to /target. You aren't required to save your config files to \interface or /board, but it may help you keep your files organized. Just remember to include the folder in the file path when you run OpenOCD:

openocd -f interface/yourconfigfile.cfg -f board/yourotherfile.cfg

For a more in-depth discussion of how to use config files and how OpenOCD searches for them, see OpenOCD Config File Paths.

Flyswatter Config Files

These files add support for different versions of the TinCanTools Flyswatter. Flyswatter config files usually go in the OpenOCD's /interface folder, although this is not required.


flyswatter2.cfg

This is the config file for the TinCanTools Flyswatter2. OpenOCD does not currently support the Flyswatter2; you will need to compile OpenOCD yourself to use it with the Flyswatter2. This file is included in the OpenOCD 0.5.0 Patch and the OpenOCD 0.4.0 Flyswatter 2/3 Patch.


Download flyswatter2.cfg
Right-click the link and select "Save As"

Full text of flyswatter2.cfg:

#
# TinCanTools Flyswatter
#
# http://www.tincantools.com/product.php?productid=16134
#

interface ft2232
ft2232_device_desc "Flyswatter2"
ft2232_layout "flyswatter2"
ft2232_vid_pid 0x0403 0x6010
jtag_khz 15000

flyswatter.cfg with JTAG Clock Speed

This file replaces flyswatter.cfg for the original Flyswatter. The new file sets the JTAG clock speed. This is required for OpenOCD 0.5.0 or any build based on OpenOCD 0.4.0 development code. It is not required for the 0.4.0 release. This file is included in the OpenOCD 0.5.0 Patch.

This file uses the jtag_khz command rather than the new adapter_khz command for compatibility with OpenOCD-0.4.0.


Download flyswatter.cfg
Right-click the link and select "Save As"

Full text of flyswatter.cfg:

# TinCanTools Flyswatter
# http://www.tincantools.com/product.php?productid=16134
#
# This revision of flyswatter.cfg adds the jtag_khz line,
# needed by the development version of OpenOCD available at 
# git://openocd.git.sourceforge.net/gitroot/openocd/openocd.

interface ft2232
ft2232_device_desc "Flyswatter"
ft2232_layout "flyswatter"
ft2232_vid_pid 0x0403 0x6010
jtag_khz 6000





Board Config Files

These files add support for different target boards. Board config files usually go in the OpenOCD's /board folder, although this is not required.

hammer.cfg

This is the config file for the TinCanTools Hammer board. This is file replaces the hammer.cfg file provided with OpenOCD. It corrects the JTAG Tap Unexpected error with the old hammer.cfg by correctly setting the JTAG tap ID. This file is included in the OpenOCD 0.5.0 Patch.


Download hammer.cfg
Right-click the link and select "Save As"

Full text of hammer.cfg:

# Target Configuration for the TinCanTools S3C2410 Based Hammer Module
# http://www.tincantools.com
# This revision is an update for hammer.cfg provided with OpenOCD to
# correctly set CPUTAPID.

set CPUTAPID 0x0032409d
source [find target/samsung_s3c2410.cfg]

$_TARGETNAME configure -event reset-init {
	# Reset Script for the TinCanTools S3C2410 Based Hammer Module
	# http://www.tincantools.com
 	#
 	# Setup primary clocks and initialize the SDRAM
 	mww 0x53000000 0x00000000
 	mww 0x4a000008 0xffffffff
 	mww 0x4a00000c 0x000007ff
 	mww 0x4c000000 0x00ffffff
 	mww 0x4c000014 0x00000003
 	mww 0x4c000004 0x000a1031
 	mww 0x48000000 0x11111122
 	mww 0x48000004 0x00000700
 	mww 0x48000008 0x00000700
 	mww 0x4800000c 0x00000700
 	mww 0x48000010 0x00000700
 	mww 0x48000014 0x00000700
 	mww 0x48000018 0x00000700
 	mww 0x4800001c 0x00018005
 	mww 0x48000020 0x00018005
 	mww 0x48000024 0x009c0459
 	mww 0x48000028 0x000000b2
 	mww 0x4800002c 0x00000030
 	mww 0x48000030 0x00000030
 	flash probe 0
} 
 
 
#flash configuration
#flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target> [driver_options ...]
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME cfi 0x00000000 0x1000000 2 2 $_TARGETNAME

olimex_pic32mx.cfg

This is the config file for the Olimex PIC-P32MX board. This very short file sets the JTAG clock speed and tap ID for the board, then calls the config file for the CPU. The CPU config file target/pic32mx.cfg is provided with OpenOCD. This file is included in the OpenOCD 0.5.0 Patch and the OpenOCD 0.4.0 Flyswatter 2/3 Patch.

This file should be used in place of the pic-p32mx.cfg file provided with OpenOCD.


Download olimex_pic32mx.cfg
Right-click the link and select "Save As"

Full text of olimex_pic32mx.cfg:

# Configuration for the Olimex PIC-32MX development board
# Config file supplied by TinCanTools
# http://www.tincantools.com

jtag_khz 15000
set CPUTAPID 0x50916053
source [find target/pic32mx.cfg]





Target Config Files

Target config files must go in a folder called /target somewhere in OpenOCD's search path.

amdm37x.cfg

This is the config file for the am37x and dm37x processors, used with the TI Beagleboard XM in the Flyswatter2 Beagleboard XM How To. This file is almost identical to the original amdm37x.cfg file provided with OpenOCD 0.5.0. The only change is to line 32, to support JTAG TAP id 0x2b89102f. This file is included in the OpenOCD 0.5.0 Patch v0.12.


Download amdm37x.cfg
Right-click the link and select "Save As"


omap3530_norclk.cfg

OpenOCD sometimes has issues initializing the Beagleboard's JTAG with the Flyswatter2 adaptive clocking enabled. Adaptive clocking is enabled in the config file omap3530.cfg, called from ti_beagleboard.cfg. This is a modified config file that doesn't enable adaptive clocking. This file is intended only for use with the Beagleboard. For more information, see Beagleboard Troubleshooting: JTAG Tap Unexpected 0x000000ff.


Download omap3530_norclk.cfg
Right-click the link and select "Save As"