1
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
4
# This file is part of DejaGnu.
6
# DejaGnu is free software; you can redistribute it and/or modify it
7
# under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2 of the License, or
9
# (at your option) any later version.
11
# DejaGnu is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with DejaGnu; if not, write to the Free Software Foundation,
18
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
# We have to maintain two connections to the DOS box where the board
24
# is being held. One of them runs an I/O monitor process, while the other
25
# is used to actually start the program under test running on the board.
28
proc tic80_load { dest prog args } {
29
set dos_box [board_info $dest dos_host]
31
remote_spawn $dos_box [board_info $dest io_program]
33
set status [remote_ld $dest $prog]
35
if { $status != "pass" } {
39
set result [remote_wait $dos_box 300]
40
set output [lindex $result 1]
41
if { [lindex $result 0] < 0 } {
42
if [board_info $dos_box exists fileid] {
43
dos_interrupt_job $dos_box
50
regsub "(\\*\\*\\* EXIT code \[0-9\]+\[\r\n]+).*$" "$output" "\\1" output
51
verbose "board out is $output"
52
set bstatus [check_for_board_status output]
53
if { [lindex $result 0] >= 0 } {
54
if { $bstatus == 0 } {
58
remote_file build delete "a.fix"
59
return [list $status $output]
62
proc tic80_ld { dest prog } {
63
set dos_box [board_info $dest dos_host]
66
if { [remote_swap_conn $dos_box] == "fail" } {
67
if { [remote_push_conn $dos_box] == "fail" } {
72
set prog [remote_download $dos_box $prog "a.fix"]
74
remote_spawn $dos_box "[board_info $dest start_program] $prog"
75
remote_expect $dos_box 10 {
76
-re "file\[(\]s\[)\] copied" {}
79
dos_interrupt_job $dos_box
81
remote_push_conn $dos_box
83
remote_swap_conn $dos_box
88
# Close the connection to the DOS box.
90
proc tic80_close { host } {
91
set dos_box [board_info $host dos_host]
93
return [remote_close $dos_box]
96
set_board_info protocol "tic80"
97
set_board_info gdb,use_standard_load 1
98
set_board_info gdb,no_push_conn 1
99
set_board_info gdb,do_reload_on_run 1
100
set_board_info gdb,use_breakpoint_for_stub 1