@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} {
--- /dev/null
+# Simple tcl client to connect to openocd\r
+puts "Use empty line to exit"\r
+set fo [socket 127.0.0.1 6666]\r
+puts -nonewline stdout "> "\r
+flush stdout\r
+while {[gets stdin line] >= 0} {\r
+ if {$line eq {}} break\r
+ puts $fo $line\r
+ flush $fo\r
+ gets $fo line\r
+ puts $line\r
+ puts -nonewline stdout "> "\r
+ flush stdout\r
+}\r
+close $fo\r