/[dejagnu]/dejagnu/baseboards/mcore-moto-sim.exp
ViewVC logotype

Diff of /dejagnu/baseboards/mcore-moto-sim.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by rsavoye, Mon Feb 5 04:18:11 2001 UTC revision 1.2 by bje, Thu Aug 7 03:42:42 2003 UTC
# Line 20  set_board_info cflags    "[libgloss_incl Line 20  set_board_info cflags    "[libgloss_incl
20  set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"  set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
21    
22  # No linker script needed.  # No linker script needed.
23  set_board_info ldscript "";  set_board_info ldscript ""
24    
25  # The simulator doesn't return exit statuses and we need to indicate this;  # The simulator doesn't return exit statuses and we need to indicate this;
26  # the standard GCC wrapper will work with this target.  # the standard GCC wrapper will work with this target.
# Line 55  proc sim_spawn { dest cmdline args } { Line 55  proc sim_spawn { dest cmdline args } {
55      puts $handle "quit"      puts $handle "quit"
56      close $handle      close $handle
57            
58      return [eval remote_spawn host \{ $sim $simflags "-sdoit" \} $args];      return [eval remote_spawn host \{ $sim $simflags "-sdoit" \} $args]
59  }  }
60    
61  proc sim_wait { dest timeout } {  proc sim_wait { dest timeout } {
62      return [remote_wait host $timeout];      return [remote_wait host $timeout]
63  }  }
64    
65  proc sim_load { dest prog args } {  proc sim_load { dest prog args } {
# Line 67  proc sim_load { dest prog args } { Line 67  proc sim_load { dest prog args } {
67      if ![file exists $prog] then {      if ![file exists $prog] then {
68          perror "sim.exp: $prog to be downloaded does not exist."          perror "sim.exp: $prog to be downloaded does not exist."
69          verbose -log "$prog to be downloaded does not exist." 3          verbose -log "$prog to be downloaded does not exist." 3
70          return [list "untested" ""];          return [list "untested" ""]
71      }      }
72    
73      set sim_time_limit 240      set sim_time_limit 240
74    
75      set output "";      set output ""
76    
77      set res [remote_spawn target "${prog}"];      set res [remote_spawn target "${prog}"]
78    
79      if { $res <= 0 } {      if { $res <= 0 } {
80          return [list "fail" "remote_spawn failed"];          return [list "fail" "remote_spawn failed"]
81      }      }
82    
83      set state [remote_wait target $sim_time_limit];      set state [remote_wait target $sim_time_limit]
84      set status [lindex $state 0];      set status [lindex $state 0]
85      set output [lindex $state 1];      set output [lindex $state 1]
86      verbose "Output is $output";      verbose "Output is $output"
87    
88      set status2 [check_for_board_status output];      set status2 [check_for_board_status output]
89      if { $status2 >= 0 } {      if { $status2 >= 0 } {
90          set status $status2          set status $status2
91      }      }
# Line 99  proc sim_load { dest prog args } { Line 99  proc sim_load { dest prog args } {
99      } else {      } else {
100          set result "fail"          set result "fail"
101      }      }
102      return [list $result $output];      return [list $result $output]
103  }  }
104    
105  set_board_info protocol  "sim";  set_board_info protocol  "sim"
106    
107  # By default, assume the simulator is slow.  This causes some tests  # By default, assume the simulator is slow.  This causes some tests
108  # to either be simplified or skipped completely.  # to either be simplified or skipped completely.
# Line 119  proc find_sim { target_alias sim_dir sim Line 119  proc find_sim { target_alias sim_dir sim
119      ## XXX - fixme - this should not be hardcoded.      ## XXX - fixme - this should not be hardcoded.
120      ## XXX - fixme - this should vary depending upon endianism selected.      ## XXX - fixme - this should vary depending upon endianism selected.
121            
122      return "/home/nickc/bin/linux/sim-be";      return "/home/nickc/bin/linux/sim-be"
123  }  }
124    
125  set_board_info is_simulator 1;  set_board_info is_simulator 1

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26