* Makefile.am: Add an empty check-DEJAGNU target, cause we only
[dejagnu.git] / config / tic80.exp
blobef12778309e47a9640c6af47b636d627e2ed3edf
2 # Nasty ugly stuff.
4 # We have to maintain two connections to the DOS box where the board
5 # is being held. One of them runs an I/O monitor process, while the other
6 # is used to actually start the program under test running on the board.
9 proc tic80_load { dest prog args } {
10 set dos_box [board_info $dest dos_host];
12 remote_spawn $dos_box [board_info $dest io_program];
14 set status [remote_ld $dest $prog];
16 if { $status != "pass" } {
17 return $status;
20 set result [remote_wait $dos_box 300];
21 set output [lindex $result 1];
22 if { [lindex $result 0] < 0 } {
23 if [board_info $dos_box exists fileid] {
24 dos_interrupt_job $dos_box;
25 } else {
26 remote_close $dos_box;
30 set status "fail";
31 regsub "(\\*\\*\\* EXIT code \[0-9\]+\[\r\n]+).*$" "$output" "\\1" output;
32 verbose "board out is $output";
33 set bstatus [check_for_board_status output];
34 if { [lindex $result 0] >= 0 } {
35 if { $bstatus == 0 } {
36 set status "pass";
39 remote_file build delete "a.fix";
40 return [list $status $output];
43 proc tic80_ld { dest prog } {
44 set dos_box [board_info $dest dos_host];
45 set dopush 0;
47 if { [remote_swap_conn $dos_box] == "fail" } {
48 if { [remote_push_conn $dos_box] == "fail" } {
49 set dopush 1;
51 remote_open $dos_box;
53 set prog [remote_download $dos_box $prog "a.fix"];
55 remote_spawn $dos_box "[board_info $dest start_program] $prog";
56 remote_expect $dos_box 10 {
57 -re "file\[(\]s\[)\] copied" {}
59 sleep 3;
60 dos_interrupt_job $dos_box;
61 if { $dopush } {
62 remote_push_conn $dos_box;
63 } else {
64 remote_swap_conn $dos_box;
66 return "pass";
69 # Close the connection to the DOS box.
71 proc tic80_close { host } {
72 set dos_box [board_info $host dos_host];
74 return [remote_close $dos_box];
77 set_board_info protocol "tic80";
78 set_board_info gdb,use_standard_load 1;
79 set_board_info gdb,no_push_conn 1;
80 set_board_info gdb,do_reload_on_run 1;
81 set_board_info gdb,use_breakpoint_for_stub 1