Menu

[f342aa]: / testing / tcl_server.tcl  Maximize  Restore  History

Download this file

16 lines (15 with data), 331 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.