summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-12 07:50:03 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-07-12 07:50:03 +0000
commita65255a06d7252614f0061823860568f4aefe1b7 (patch)
treef873ee2deaece227561151f2a738028b72b8676c
parent173a43ff15e62ad8cb716e566ec718f9a6507ef6 (diff)
downloadopenocd_libswd-a65255a06d7252614f0061823860568f4aefe1b7.tar.gz
openocd_libswd-a65255a06d7252614f0061823860568f4aefe1b7.tar.bz2
openocd_libswd-a65255a06d7252614f0061823860568f4aefe1b7.tar.xz
openocd_libswd-a65255a06d7252614f0061823860568f4aefe1b7.zip
testing/*.tcl sample & test code
git-svn-id: svn://svn.berlios.de/openocd/trunk@798 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--doc/openocd.texi2
-rw-r--r--testing/tcl_server.tcl15
2 files changed, 16 insertions, 1 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 160efa65..573457b5 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -1381,7 +1381,7 @@ of an external TCL script that can connect to openocd is shown below.
@verbatim
# Simple tcl client to connect to openocd
puts "Use empty line to exit"
-set fo [socket 127.0.0.1 5555]
+set fo [socket 127.0.0.1 6666]
puts -nonewline stdout "> "
flush stdout
while {[gets stdin line] >= 0} {
diff --git a/testing/tcl_server.tcl b/testing/tcl_server.tcl
new file mode 100644
index 00000000..c5ec2291
--- /dev/null
+++ b/testing/tcl_server.tcl
@@ -0,0 +1,15 @@
+# Simple tcl client to connect to openocd
+puts "Use empty line to exit"
+set fo [socket 127.0.0.1 6666]
+puts -nonewline stdout "> "
+flush stdout
+while {[gets stdin line] >= 0} {
+ if {$line eq {}} break
+ puts $fo $line
+ flush $fo
+ gets $fo line
+ puts $line
+ puts -nonewline stdout "> "
+ flush stdout
+}
+close $fo