testing/*.tcl sample & test code
git-svn-id: svn://svn.berlios.de/openocd/trunk@798 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
173a43ff15
commit
a65255a06d
|
@ -1381,7 +1381,7 @@ of an external TCL script that can connect to openocd is shown below.
|
||||||
@verbatim
|
@verbatim
|
||||||
# Simple tcl client to connect to openocd
|
# Simple tcl client to connect to openocd
|
||||||
puts "Use empty line to exit"
|
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 "> "
|
puts -nonewline stdout "> "
|
||||||
flush stdout
|
flush stdout
|
||||||
while {[gets stdin line] >= 0} {
|
while {[gets stdin line] >= 0} {
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue