From 486f49a293a9e8b6d58a1a3b8f8a59aca24804f1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 30 Dec 2004 20:22:02 +0000 Subject: 2004-12-30 Joel Sherrill * Makefile.am, psim: Split psim into two files. * psim-gdb: New file. --- c/src/lib/libbsp/powerpc/psim/tools/ChangeLog | 5 +++ c/src/lib/libbsp/powerpc/psim/tools/Makefile.am | 2 +- c/src/lib/libbsp/powerpc/psim/tools/psim | 22 ++----------- c/src/lib/libbsp/powerpc/psim/tools/psim-gdb | 41 +++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 21 deletions(-) create mode 100755 c/src/lib/libbsp/powerpc/psim/tools/psim-gdb (limited to 'c/src/lib/libbsp/powerpc/psim') diff --git a/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog b/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog index f43ab9b59f..734df6d602 100644 --- a/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog +++ b/c/src/lib/libbsp/powerpc/psim/tools/ChangeLog @@ -1,3 +1,8 @@ +2004-12-30 Joel Sherrill + + * Makefile.am, psim: Split psim into two files. + * psim-gdb: New file. + 2004-09-24 Ralf Corsepius * configure.ac: Require automake > 1.9. diff --git a/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am b/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am index 0ba47df916..9bea2b5e99 100644 --- a/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am +++ b/c/src/lib/libbsp/powerpc/psim/tools/Makefile.am @@ -22,7 +22,7 @@ $(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim: psim $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$ $(INSTALL_SCRIPT) $< $(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim TMPINSTALL_FILES += $(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim -$(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim-gdb: psim $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp) +$(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim-gdb: psim-gdb $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp) $(INSTALL_SCRIPT) $< $(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim-gdb TMPINSTALL_FILES += $(PROJECT_ROOT)/@RTEMS_BSP@/tests/psim-gdb diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim b/c/src/lib/libbsp/powerpc/psim/tools/psim index 99ca501e1b..ca9eebcba8 100755 --- a/c/src/lib/libbsp/powerpc/psim/tools/psim +++ b/c/src/lib/libbsp/powerpc/psim/tools/psim @@ -2,7 +2,7 @@ # # Shell script to ease invocation of the powerpc simulator # -# COPYRIGHT (c) 1989-1999. +# COPYRIGHT (c) 1989-2004. # On-Line Applications Research Corporation (OAR). # # The license and distribution terms for this file may be @@ -13,9 +13,7 @@ # 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 @@ -28,25 +26,9 @@ echo "/openprom/options/oea-memory-size 8388608" >> ${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-rtems4.7-run -GDB=powerpc-rtems4.7-gdb +${RUN} -f ${TREE_FILE} ${RUN_DEBUG} $* -case $0 in - *gdb*) - ${GDB} -x ${GDB_FILE} $* - ;; - *) - # ${RUN} -f ${TREE_FILE} $* - ${RUN} -f ${TREE_FILE} ${RUN_DEBUG} $* - ;; -esac exit $? diff --git a/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb b/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb new file mode 100755 index 0000000000..e5e45f3ee2 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/psim/tools/psim-gdb @@ -0,0 +1,41 @@ +#! /bin/sh +# +# Shell script to ease invocation of the powerpc simulator +# +# COPYRIGHT (c) 1989-2004. +# On-Line Applications Research Corporation (OAR). +# +# The license and distribution terms for this file may be +# found in found in the file LICENSE in this distribution or at +# http://www.rtems.com/license/LICENSE. +# +# $Id$ +# + +TREE_FILE=psim_tree.${LOGNAME} +GDB_FILE=gdb_tree.${LOGNAME} + +# Build this user's device tree file +echo "/#address-cells 2" > ${TREE_FILE} +#echo "/openprom/options/oea-memory-size 4194304" >> ${TREE_FILE} +echo "/openprom/options/oea-memory-size 8388608" >> ${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} + +GDB=powerpc-rtems4.7-gdb + +${GDB} -x ${GDB_FILE} $* + +exit $? + -- cgit v1.2.3