]> git.sur5r.net Git - openocd/blob - src/scripting.txt
- fix typo in memory.tcl
[openocd] / src / scripting.txt
1 Plan for hosted scripting support in OpenOCD
2 ============================================
3 Jim Tcl support in OpenOCD currently exists as a patch.
4
5 There has been some discussion on the list as to what
6 purpose scripting support might serve in OpenOCD.
7
8 Also Lua was proposed as a scripting language, but 
9 only Jim Tcl has been forwarded as a patch.
10
11 Tcl is also backwards syntax compatible with OpenOCD 
12 commands.
13
14 What scripting will not do
15 ==========================
16 It is not the intention that normal OpenOCD users will
17 use tcl scripting extensively, write lots of clever scripts,
18 or contribute back to OpenOCD. 
19
20 The scripting support is intended for developers of OpenOCD.
21
22 Target scripts can contain new procedures that end users may
23 tinker to their needs without really understanding tcl.
24
25 Since end users are not expected to mess with the scripting
26 language, the choice of language is not terribly important
27 to those same end users.
28
29 Uses of scripting
30 =================
31 Default implementation of procedures in tcl/procedures.tcl.
32
33 - Polymorphic commands for target scripts.
34   - there will be added some commands in Tcl that the target
35     scripts can replace.
36   - produce <productionfile> <serialnumber>. Default implementation
37     is to ignore serial number and write a raw binary file
38     to beginning of first flash. Target script can dictate
39     file format and structure of serialnumber. Tcl allows
40     an argument to consit of e.g. a list so the structure of
41     the serial number is not limited to a single string.
42   - reset handling. Precise control of how srst, trst & 
43     tms is handled.
44 - replace some parts of the current command line handler.
45   This is only to simplify the implementation of OpenOCD
46   and will have no externally visible consequences.
47   Tcl has an advantage in that it's syntax is backwards
48   compatible with the current OpenOCD syntax.