aboutsummaryrefslogtreecommitdiff
path: root/baseboards
diff options
context:
space:
mode:
authorDimitar Dimitrov <dimitar@dinux.eu>2020-12-14 23:00:50 +0200
committerJacob Bachmeyer <jcb@gnu.org>2020-12-16 20:34:26 -0600
commita4ad932a0d26c13dd80e11eac79608f0db34ffb2 (patch)
tree404ee1f0d0d7114eb607a6bc8497d7d9f96213f6 /baseboards
parent775278e054845015254643b1ff16e0b993ce4036 (diff)
downloaddejagnu-a4ad932a0d26c13dd80e11eac79608f0db34ffb2.zip
dejagnu-a4ad932a0d26c13dd80e11eac79608f0db34ffb2.tar.gz
dejagnu-a4ad932a0d26c13dd80e11eac79608f0db34ffb2.tar.bz2
Add baseboard for PRU simulator
I'm running [1] PRU regression tests using this baseboard definition and mainline Binutils, GCC, Newlib and GNU Simulator. [1] https://github.com/dinuxbg/gnupru/blob/master/testing/buildbot-pru.sh ChangeLog: * Makefile.am: Add pru-sim.exp. * Makefile.in: Ditto. * baseboards/pru-sim.exp: New file. Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
Diffstat (limited to 'baseboards')
-rw-r--r--baseboards/pru-sim.exp60
1 files changed, 60 insertions, 0 deletions
diff --git a/baseboards/pru-sim.exp b/baseboards/pru-sim.exp
new file mode 100644
index 0000000..40c597e
--- /dev/null
+++ b/baseboards/pru-sim.exp
@@ -0,0 +1,60 @@
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {pru-elf}
+
+# Load the generic configuration for this board, This will define a basic
+# set of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# The name of the simulator is "pru".
+setup_sim pru
+
+# No multilib flags needed by default.
+process_multilib_options ""
+
+# The compiler used to build for this board. This has *nothing* to do
+# with what compiler is tested if we're testing gcc.
+set_board_info compiler "[find_gcc]"
+
+# PRU arguments are mostly passed in registers. But GCC regression tests
+# are written with other machines in mind, so the builtin_apply's
+# aruments stack size is non-zero. On top of that, the stack top for
+# PRU's main is very close to the end of SRAM. Close enough that the
+# spurious "stack copy" reads outside of the DRAM area, causing a
+# simulator abort. For example, see how builtin-apply-3.c copies 16
+# bytes from the arguments stack, while PRU has passed all of its
+# arguments in registers.
+#
+# Temporary solution is to add a few bytes of "guard" space, so that
+# existing GCC testcases can be executed successfully. Hence set the
+# stack top a few bytes below the simulator's DRAM end.
+set workaround_ldflags "-Wl,--defsym=_stack_top=0x3fff800"
+
+set_board_info cflags "-mmcu=sim [libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $workaround_ldflags"
+
+# No support for signals on this target.
+set_board_info gdb,nosignals 1
+
+# Low-end workstations might require even larger timeouts.
+set timeout 120