This commit is contained in:
Joel Sherrill
1998-04-14 20:29:35 +00:00
parent e6e5e47704
commit c8bc6e4567
3 changed files with 54 additions and 6 deletions

View File

@@ -4,22 +4,26 @@
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/tests
PGMS=runtest
PGMS=runtest psim
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
install: $(INSTALLED)
cp $(DESTDIR)/psim $(DESTDIR)/psim-gdb
# Install the program
$(DESTDIR)/%: %
$(make-script)

View File

@@ -0,0 +1,44 @@
#! /bin/sh
#
# Shell script to ease invocation of the powerpc simulator
#
# $Id$
#
TREE_FILE=psim_tree.${LOGNAME}
GDB_FILE=gdb_tree.${LOGNAME}
# GDB_DEBUG="-t sem-device"
# RUN_DEBUG="-t sem_device"
# Build this user's device tree file
echo "/#address-cells 2" > ${TREE_FILE}
echo "/openprom/options/oea-memory-size 4194304" >> ${TREE_FILE}
# These require the semaphore and shared memory device models.
# echo "/shm@0xc0000000/reg 0xc0000000 0x10000" >> ${TREE_FILE}
# echo "/shm@0xc0000000/key ${RTEMS_SHM_KEY}" >> ${TREE_FILE}
# echo "/sem@0xc0010000/reg 0xc0010000 12" >> ${TREE_FILE}
# echo "/sem@0xc0010000/key ${RTEMS_SHM_SEMAPHORE_KEY}" >> ${TREE_FILE}
# echo "/sem@0xc0010000/value -1" >> ${TREE_FILE}
#
# Build this user's gdb script
echo "tar sim -f ${TREE_FILE} ${GDB_DEBUG}" > ${GDB_FILE}
echo "load" >> ${GDB_FILE}
echo "b _Internal_error_Occurred" >> ${GDB_FILE}
echo "b rtems_fatal_error_occurred" >> ${GDB_FILE}
echo "b __assert" >> ${GDB_FILE}
RUN=powerpc-rtems-run
GDB=powerpc-rtems-gdb
case $0 in
*gdb*)
${GDB} -x ${GDB_FILE} $*
;;
*)
${RUN} -f ${TREE_FILE} $*
${RUN} -f ${TREE_FILE} ${RUN_DEBUG} $*
;;
esac
exit $?

View File

@@ -2,7 +2,7 @@
#
# $Id$
#
# Run rtems tests on the hppa simulator
# Run rtems tests on the powerpc simulator
# This program generates a simulator script to run each test
# Typically the test is then run, although it can be generated
# and left as a file using -s