Next: , Previous: About JIM-Tcl, Up: Top


5 Running

The --help option shows:

bash$ openocd --help

--help       | -h       display this help
--version    | -v       display OpenOCD version
--file       | -f       use configuration file <name>
--search     | -s       dir to search for config files and scripts
--debug      | -d       set debug level <0-3>
--log_output | -l       redirect log output to file <name>
--command    | -c       run <command>
--pipe       | -p       use pipes when talking to gdb

By default OpenOCD reads the file configuration file “openocd.cfg” in the current directory. To specify a different (or multiple) configuration file, you can use the “-f” option. For example:

       openocd -f config1.cfg -f config2.cfg -f config3.cfg

Once started, OpenOCD runs as a daemon, waiting for connections from clients (Telnet, GDB, Other).

If you are having problems, you can enable internal debug messages via the “-d” option.

Also it is possible to interleave JIM-Tcl commands w/config scripts using the -c command line switch.

To enable debug output (when reporting problems or working on OpenOCD itself), use the -d command line switch. This sets the debug_level to "3", outputting the most information, including debug messages. The default setting is "2", outputting only informational messages, warnings and errors. You can also change this setting from within a telnet or gdb session using debug_level <n> (see debug_level).

You can redirect all output from the daemon to a file using the -l <logfile> switch.

Search paths for config/script files can be added to OpenOCD by using the -s <search> switch. The current directory and the OpenOCD target library is in the search path by default.

For details on the -p option. See Connecting to GDB.

Note! OpenOCD will launch the GDB & telnet server even if it can not establish a connection with the target. In general, it is possible for the JTAG controller to be unresponsive until the target is set up correctly via e.g. GDB monitor commands in a GDB init script.