1# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
2# Foundation, Inc.
3#
4# This file is part of DejaGnu.
5#
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.
10#
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.
15#
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.
19
20# Load the tool-specific configuration for this board, as well as the
21# generic configuration. This will define any routines needed by the
22# tool to communicate with the board.
23load_generic_config "h8300"
24
25# Don't use anything by default.
26process_multilib_options ""
27
28# The default compiler for this target.
29set_board_info compiler "[find_gcc]"
30
31# We only support newlib on this target. We assume that all multilib
32# options have been specified before we get here.
33set_board_info cflags "[newlib_include_flags]"
34set_board_info ldflags "[newlib_link_flags]"
35
36# The GDB protocol used with this board.
37set_board_info gdb_protocol "remote"
38# It's running a GDB stub in ROM.
39set_board_info use_gdb_stub 1
40
41# There's no support for argument-passing.
42set_board_info noargs 1
43# Nor does it have real signals.
44set_board_info gdb,nosignals 1
45# And it can't do I/O.
46set_board_info gdb,noinferiorio 1
47# Nor can it return results.
48set_board_info gdb,noresults 1
49
50# Limit the stack size to something real tiny.
51set_board_info gcc,stack_size 4096
52
53# The board can get wedged in amusing and interesting ways.
54set_board_info unreliable 1
55
56# There's no long long support on this target
57set_board_info no_long_long  1
58
59# sizeof int != sizeof long.
60set_board_info gdb,short_int 1
61
62# Pick the right linker script if -mh/-ms is specified.
63
64set linker_script "h8300.ld"
65
66foreach x $board_variant_list {
67    regsub -all "^\[ \t\]*" "$x" "" x
68    regsub -all "\[ \t\]*$" "$x" "" x
69
70    case $x in {
71	{ h -mh } {
72	    set linker_script "h8300h.ld"
73	}
74	{ s -ms } {
75	    set linker_script "h8300s.ld"
76	}
77    }
78}
79
80# Whee, magic linker scripts hidden away.
81#
82# This one's dependent on the multilib options in use, sadly. And we
83# *need* a linker script. Really. Otherwise the code gets linked at
84# the wrong address and it won't run on the board.
85set_board_info ldscript "-Wl,-T${prefix_dir}/h8300-hms/${linker_script}"
86
87unset linker_script
88