summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2004-12-30 20:22:02 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2004-12-30 20:22:02 +0000
commit486f49a293a9e8b6d58a1a3b8f8a59aca24804f1 (patch)
tree76b4059b263c1f396f54679bd705301d77ba2e2a
parentCosmetics. (diff)
downloadrtems-486f49a293a9e8b6d58a1a3b8f8a59aca24804f1.tar.bz2
2004-12-30 Joel Sherrill <joel@OARcorp.com>
* Makefile.am, psim: Split psim into two files. * psim-gdb: New file.
-rw-r--r--c/src/lib/libbsp/powerpc/psim/tools/ChangeLog5
-rw-r--r--c/src/lib/libbsp/powerpc/psim/tools/Makefile.am2
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/psim22
-rwxr-xr-xc/src/lib/libbsp/powerpc/psim/tools/psim-gdb41
4 files changed, 49 insertions, 21 deletions
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 <joel@OARcorp.com>
+
+ * Makefile.am, psim: Split psim into two files.
+ * psim-gdb: New file.
+
2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
* 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 $?
+