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" } {
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
;
26 remote_close $dos_box
;
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 } {
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
];
47 if { [remote_swap_conn $dos_box
] == "fail" } {
48 if { [remote_push_conn $dos_box
] == "fail" } {
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" {}
60 dos_interrupt_job $dos_box
;
62 remote_push_conn $dos_box
;
64 remote_swap_conn $dos_box
;
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