remote_send $dest "\n"
set got_one 0
remote_expect $dest 5 {
- -re "$shell_prompt" { set got_one 1; exp_continue; }
+ -re "$shell_prompt" { set got_one 1; exp_continue }
default {
if { ! $got_one } {
remote_close $dest
}
set got_p 0
- for { set tries 0; } { (! $got_p) && $tries < 5 } { incr tries } {
+ for { set tries 0 } { (! $got_p) && $tries < 5 } { incr tries } {
remote_send $dest "\r\n\r\n"
remote_expect $dest 5 {
-re "${shell_prompt}$" {
set shell_prompt [board_info $dest shell_prompt]
if { [llength $args] > 0 } {
- for { set x 0; } { $x < [llength $args] } { incr x ; } {
+ for { set x 0 } { $x < [llength $args] } { incr x } {
if { [lindex $args $x] != "" } {
verbose -log "Cannot pass parameters or input file to this target"
return [list "unsupported" ""]
set doing_ddb_init 1
remote_close $dest
- for { set x 0; } { $x < 3 } { incr x; } {
+ for { set x 0 } { $x < 3 } { incr x } {
set shell_id [remote_open $dest]
if { $shell_id == "" || $shell_id < 0 } {
remote_reboot $dest
}
proc ddb_ether_load { dest prog args } {
- for { set x 0; } { $x < 3 } { incr x } {
+ for { set x 0 } { $x < 3 } { incr x } {
set result [eval remote_spawn \{$dest\} \{$prog\} $args]
if { $result < 0 } {
remote_reboot $dest
if ![info exists doing_ddb_init] {
set doing_ddb_init 1
- for { set i 1; } { $i <= 3 } {incr i } {
+ for { set i 1 } { $i <= 3 } { incr i } {
remote_close $dest
- for { set x 0; } { $x < 3 } { incr x; } {
+ for { set x 0 } { $x < 3 } { incr x } {
set shell_id [remote_open $dest]
if { $shell_id == "" || $shell_id < 0 } {
remote_reboot $dest
# Make a DOS batch file; we use @echo off so we don't have to see
# the DOS command prompts and such.
- for { set i 0; } { $i < 2 } { incr i } {
+ for { set i 0 } { $i < 2 } { incr i } {
set exit_status -1
verbose "calling open"
set batfile [dos_prep_command $dest "$cmdline$inp$outpf"]
set shell_prompt [board_info $dest shell_prompt]
set prefix ""
set ok 0
- for {set i 0;} {$i <= 2 && ! $ok} {incr i;} {
+ for { set i 0 } {$i <= 2 && ! $ok} { incr i } {
set shell_id [remote_open $dest]
if { $shell_id != "" && $shell_id > 0 } {
remote_send $dest "echo k\r"
verbose "running $program on $dest"
set remotebat [dos_prep_command $dest $program]
- for { set x 0; } { $x < 3 } { incr x } {
+ for { set x 0 } { $x < 3 } { incr x } {
if { [dos_start_command $remotebat $dest] == "" } {
return [board_info $dest fileid]
}
global timeout
set argnames { "command-line arguments" "input file" "output file" }
- for { set x 0; } { $x < [llength $args] } { incr x } {
+ for { set x 0 } { $x < [llength $args] } { incr x } {
if { [lindex $args $x] != "" } {
return [list "unsupported" "no support for [lindex $argnames $x] on this target"]
}
-re ".*$gdb_prompt $" {
remote_send host "signal 0\n"
remote_expect host 10 {
- -re "signal 0\[\r\n\]+" { exp_continue; }
+ -re "signal 0\[\r\n\]+" { exp_continue }
-re "Continuing(\\.| with no signal\\.)\[\r\n\]" {}
}
}
gdb_stub_init $dest
- for {set x 1;} { $x < 4 } {incr x} {
+ for { set x 1 } { $x < 4 } {incr x} {
remote_close $dest
sleep 2
set command "$GDB -nw -nx"
}
proc gdb_stub_spawn { dest prog args } {
- for { set x 0; } { $x < 3 } { incr x } {
+ for { set x 0 } { $x < 3 } { incr x } {
if { [remote_ld $dest $prog] != 1 } {
return [list "fail" "remote_ld failed"]
}
global gdb_prompt
set argnames { "command-line arguments" "input file" "output file" }
- for { set x 0; } { $x < [llength $args] } { incr x } {
+ for { set x 0 } { $x < [llength $args] } { incr x } {
if { [lindex $args $x] != "" } {
return [list "unsupported" "no support for [lindex $argnames $x] on this target"]
}
remote_close $dest
if { [remote_open $dest] != "" } {
- for { set tries 0; } { $tries < 7 && ! $done } { incr tries } {
+ for { set tries 0 } { $tries < 7 && ! $done } { incr tries } {
remote_send $dest "\n"
remote_expect $dest 1 {
-re "${prompt}" {
proc i960_spawn { dest prog args } {
set shell_prompt [board_info $dest shell_prompt]
- for { set tries 0 ; } { $tries < 3 } { incr tries } {
+ for { set tries 0 } { $tries < 3 } { incr tries } {
set result [remote_ld $dest $prog]
if { $result == 0 } {
set comm "go [board_info $dest start_addr]"
}
proc i960_load { dest prog args } {
- for { set x 0; } { $x < 3 } { incr x; } {
+ for { set x 0 } { $x < 3 } { incr x } {
set id [eval remote_spawn \{$dest\} \{$prog\} $args]
if { $id < 0 } {
return [list "fail" ""]
set board_info($tname,m68k_connected) 1
set dos_host [board_info $dest dos_host]
- for { set x 0; } { $x < 3 } { incr x; } {
+ for { set x 0 } { $x < 3 } { incr x } {
set shell_id [remote_open $dos_host]
if { $shell_id == "" || $shell_id < 0 } {
remote_reboot $dos_host
}
# Flush the buffer.
remote_expect $dos_host 2 {
- -re ".+" { exp_continue; }
+ -re ".+" { exp_continue }
}
# Get past first menu.
remote_send $dos_host "\n"
remote_send $dest "\n\n"
remote_expect $dest 3 {
timeout {}
- -re ".+" { exp_continue; }
+ -re ".+" { exp_continue }
}
remote_send $dest "p\n"
remote_expect $dest 20 {
# If the load fails we want `expect_out' stored in the log and this
# saves duplicating that code.
- for { set x 0 ; } { $x < 3 } {incr x; } {
+ for { set x 0 } { $x < 3 } { incr x } {
remote_send $dest "\n"
remote_expect $dest 30 {
- -re ".*$shell_prompt $" { set x 20; }
+ -re ".*$shell_prompt $" { set x 20 }
-re "\\\[VxWorks Boot\\\]:" {
remote_send $dest "@\n"
sleep 20
exp_continue
}
- timeout { return -1; }
+ timeout { return -1 }
}
}
set outp ""
}
- for { set x 0; } { $x < 3 } { incr x } {
+ for { set x 0 } { $x < 3 } { incr x } {
set status [vxworks_ld $dest $prog]
if { $status >= 0 } {
if { $status > 0 } {
set loop 0
set remotefile ""
}
- -i $spawn_id -re "(^|\[\r\n\])226.*$prompt" { set loop 0; }
+ -i $spawn_id -re "(^|\[\r\n\])226.*$prompt" { set loop 0 }
-i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" {
set loop 0
set remotefile ""
# Sometimes we have to send multiple ^\c sequences. Don't know
# why.
set timeout 2
- for { set i 1; } {$i<=5} {incr i} {
+ for { set i 1 } { $i <= 5 } { incr i } {
send -i $shell_id "\1cc"
expect {
- -i $shell_id -re ".*Back at.*ermit.*>.*$" { set i 10;}
+ -i $shell_id -re ".*Back at.*ermit.*>.*$" { set i 10 }
-i $shell_id timeout {
if { $i > 2 } {
warning "Unable to get prompt from kermit."
if { [board_info $dest exists is_simulator] || [getenv REMOTELOAD_CACHE] == "" } {
set empty 0
} else {
- for { set x 0; } {$x < [llength $args] } {incr x} {
+ for { set x 0 } {$x < [llength $args] } {incr x} {
if { [lindex $args $x] != "" } {
set empty 0
break
set spawn_id 1000
}
- for { set i 0; } { $i < [llength $args] } { incr i ; } {
+ for { set i 0 } { $i < [llength $args] } { incr i } {
if { $need_append } {
append res "\n-i $spawn_id "
set need_append 0
}
set prefix ""
set ok 0
- for {set i 0;} {$i <= 2 && ! $ok} {incr i;} {
+ for { set i 0 } {$i <= 2 && ! $ok} { incr i } {
set shell_id [remote_open $dest]
if { $shell_id != "" && $shell_id > 0 } {
remote_send $dest "echo k\r"