Next: Config File Guidelines, Previous: Running, Up: Top
There are 4 basic ways of “configurating” OpenOCD to run, they are:
This is the prefered method, it is simple and is works well for many people. The developers of OpenOCD would encourage you to use this method. If you create a new configuration please email new configurations to the development list.
Here is an example of an openocd.cfg file for an ATMEL at91sam7x256
source [find interface/signalyzer.cfg]
# Change the default telnet port...
telnet_port 4444
# GDB connects here
gdb_port 3333
# GDB can also flash my flash!
gdb_memory_map enable
gdb_flash_program enable
source [find target/sam7x256.cfg]
There are many example configuration scripts you can work with. You should look in the directory: $(INSTALLDIR)/lib/openocd. You should find:
Look first in the “boards” area, then the “targets” area. Often a board configuration is a good example to work from.
Some believe this is a wonderful solution, others find it painful.
You can use a series of “-f filename” options on the command line, OpenOCD will read each filename in sequence, for example:
openocd -f file1.cfg -f file2.cfg -f file2.cfg
You can also intermix various commands with the “-c” command line option.
The “Monolithic File” dispenses with all “source” statements and puts everything in one self contained (monolithic) file. This is not encouraged.
Please try to “source” various files or use the multiple -f technique.
Often, one uses a “mixed approach”. Where possible, please try to “source” common things, and if needed cut/paste parts of the standard distribution configuration files as needed.
REMEMBER: The “important parts” of your configuration file are:
Some key things you should look at and understand are: