OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [dejagnu/] [config/] [ddb.exp] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#   Copyright (C) 1997 Free Software Foundation, Inc.
2
 
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
 
17
# Please email any bugs, comments, and/or additions to this file to:
18
# DejaGnu@cygnus.com
19
 
20
# This file was written by Bob Manson (manson@cygnus.com)
21
 
22
# We use GDB to talk to a vr4300 board.
23
load_generic_config "base68k";
24
 
25
set_board_info shell_prompt "NEC010> ";
26
set_board_info download_command "load tty0\n";
27
set_board_info download_response "Downloading from";
28
set_board_info go_command "g -e";
29
set_board_info startaddr "a0100000"
30
set_board_info hex_startaddr "0xa0100000"
31
set_board_info go_response "(^|\[\r\n\])(Exception Cause|\[0-9a-z\]+ \[0-9a-z\]+ break|\\*\\*\\*EXIT code )\[^\r\n\]*\[\r\n\]"
32
set_board_info output_end "\[\r\n\](Exception Cause|\[0-9a-z\]+ \[0-9a-z\]+ break).*$"
33
 
34
# Reset the prompt to what GDB needs.
35
proc ${board}_init { dest } {
36
    global doing_ddb_init;
37
    if [is_remote host] {
38
        return;
39
    }
40
 
41
    if ![info exists doing_ddb_init] {
42
        set doing_ddb_init 1;
43
 
44
        for { set i 1; } { $i <= 3 } {incr i } {
45
            remote_close $dest;
46
            for { set x 0; } { $x < 3 } { incr x; } {
47
                set shell_id [remote_open $dest];
48
                if { $shell_id == "" || $shell_id < 0 } {
49
                    remote_reboot $dest;
50
                } else {
51
                    break;
52
                }
53
            }
54
 
55
            set count 0;
56
            remote_send $dest "\n";
57
            remote_expect $dest 20 {
58
                -re ".*PMON> $" {
59
                    remote_send $dest "set prompt \"NEC010> \"\n";
60
                    exp_continue;
61
                }
62
                -re "NEC010> $" {
63
                    set i 10;
64
                }
65
                timeout { }
66
                -re "0x0" {
67
                    count++;
68
                    if(count<5) {
69
                        exp_continue;
70
                    }
71
                }
72
            }
73
            if { $i < 3 }  {
74
                remote_reboot $dest;
75
            }
76
        }
77
        remote_close $dest;
78
        unset doing_ddb_init;
79
    } else {
80
        return;
81
    }
82
}
83
 
84
set_board_info send_initial_cr  1
85
set_board_info dont_wait_for_prompt 1
86
 
87
# If no output format is specified, use objcopy.
88
if ![board_info $board exists output_format] {
89
    set tempfil [lookfor_file $tool_root_dir binutils/objcopy];
90
    if { $tempfil != "" } {
91
        set_board_info objcopy $tempfil
92
    } else {
93
        set_board_info objcopy [transform objcopy]
94
    }
95
    unset tempfil
96
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.