feeble beginnings for tcl api rules.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 15 Jul 2008 14:10:13 +0000 (14:10 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 15 Jul 2008 14:10:13 +0000 (14:10 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@809 b42882b7-edfa-0310-969c-e2dbd0fdcd60

doc/openocd.texi

index 573457b5e9f31ec72e00a49a359d874e9d9efb7c..3fc5fa5e62d843dc05b693a4c896a1447dad7191 100644 (file)
@@ -52,6 +52,7 @@ This manual documents edition @value{EDITION} of the Open On-Chip Debugger
 * Sample Scripts::    Sample Target Scripts
 * GDB and OpenOCD::   Using GDB and OpenOCD
 * TCL and OpenOCD::   Using TCL and OpenOCD
+* TCL scripting API:: Tcl scripting API
 * Upgrading::         Deprecated/Removed Commands
 * FAQ::               Frequently Asked Questions
 * License::           GNU Free Documentation License
@@ -1399,6 +1400,49 @@ close $fo
 This script can easily be modified to front various GUIs or be a sub
 component of a larger framework for control and interaction.
 
+
+@node TCL scripting API
+@chapter TCL scripting API
+@cindex TCL scripting API
+API rules
+
+The commands are stateless. E.g. the telnet command line has a concept
+of currently active target, the Tcl API proc's take this sort of state
+information as an argument to each proc.
+
+There are three main types of return values: single value, name value
+pair list and lists. 
+
+Name value pair. The proc 'foo' below returns a name/value pair
+list. 
+
+@verbatim
+
+ >  set foo(me)  Duane
+ >  set foo(you) Oyvind
+ >  set foo(mouse) Micky
+ >  set foo(duck) Donald
+
+If one does this:
+
+ >  set foo
+
+The result is:
+
+    me Duane you Oyvind mouse Micky duck Donald
+
+Thus, to get the names of the associative array is easy:
+
+     foreach  { name value }   [set foo]   {
+                puts "Name: $name, Value: $value"
+     }
+@end verbatim
+Lists returned must be relatively small. Otherwise a range
+should be passed in to the proc in question.
+
+
+
 @node Upgrading
 @chapter Deprecated/Removed Commands
 @cindex Deprecated/Removed Commands

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)