3 About JIM-Tcl
OpenOCD includes a small “Tcl Interpreter” known as JIM-Tcl.
This programming language provides a simple and extensible
command interpreter.
All commands presented in this Guide are extensions to JIM-Tcl.
You can use them as simple commands, without needing to learn
much of anything about Tcl.
Alternatively, can write Tcl programs with them.
You can learn more about JIM at its website, http://jim.berlios.de.
- JIM vs. Tcl
JIM-TCL is a stripped down version of the well known Tcl language,
which can be found here: http://www.tcl.tk. JIM-Tcl has far
fewer features. JIM-Tcl is a single .C file and a single .H file and
implements the basic Tcl command set. In contrast: Tcl 8.6 is a
4.2 MB .zip file containing 1540 files.
- Missing Features
Our practice has been: Add/clone the real Tcl feature if/when
needed. We welcome JIM Tcl improvements, not bloat.
- Scripts
OpenOCD configuration scripts are JIM Tcl Scripts. OpenOCD's
command interpreter today is a mixture of (newer)
JIM-Tcl commands, and (older) the orginal command interpreter.
- Commands
At the OpenOCD telnet command line (or via the GDB mon command) one
can type a Tcl for() loop, set variables, etc.
Some of the commands documented in this guide are implemented
as Tcl scripts, from a startup.tcl file internal to the server.
- Historical Note
JIM-Tcl was introduced to OpenOCD in spring 2008.
- Need a crash course in Tcl?
See Tcl Crash Course.