2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>

* psim-bottom, psim-gdb-bottom, psim-gdb-top.in, psim-shared,
	psim-top.in: Clean up and works better. Uses argv[0] to override
	configured target name.
This commit is contained in:
Joel Sherrill
2008-12-04 20:27:35 +00:00
parent b6e3a7e26d
commit deed2a08f6
6 changed files with 22 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* psim-bottom, psim-gdb-bottom, psim-gdb-top.in, psim-shared,
psim-top.in: Clean up and works better. Uses argv[0] to override
configured target name.
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> 2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* psim-bottom, psim-gdb-bottom, psim-shared, psim-top.in: Add ability * psim-bottom, psim-gdb-bottom, psim-shared, psim-top.in: Add ability

View File

@@ -27,6 +27,10 @@ if [ $# -eq 0 ] ; then
fatal fatal
fi fi
if [ X${RUN} = X ] ; then
RUN=${rtemsTarget}-run
fi
gen_device_tree ${1} >${TREE_FILE} gen_device_tree ${1} >${TREE_FILE}
runone ${1} ${limit} runone ${1} ${limit}
rm -f ${TREE_FILE} rm -f ${TREE_FILE}

View File

@@ -2,11 +2,10 @@
## TODO: may want command line ability to turn on some psim tracing ## TODO: may want command line ability to turn on some psim tracing
# Recognize special argument to force System V IPC support on # Recognize special argument to force System V IPC support on
use_sysv_ipc="auto"
if [ X${1} = "X-psim_sysv" ] ; then if [ X${1} = "X-psim_sysv" ] ; then
use_sysv_ipc="yes" use_sysv_ipc="yes"
shift shift
else
use_sysv_ipc="auto"
fi fi
## Generate the GDB Command Script ## Generate the GDB Command Script
@@ -21,7 +20,7 @@ gen_gdb_script()
echo "printf \"Use run to start the RTEMS application\\n\"" echo "printf \"Use run to start the RTEMS application\\n\""
} }
GDB=powerpc-rtems4.9-gdb GDB=${rtemsTarget}-gdb
gen_device_tree ${1} >${TREE_FILE} gen_device_tree ${1} >${TREE_FILE}
gen_gdb_script >${GDB_FILE} gen_gdb_script >${GDB_FILE}

View File

@@ -12,7 +12,7 @@
# $Id$ # $Id$
# #
GDB=@target_alias@-gdb rtemsTarget=@target_alias@
GDB_FILE=gdb_tree.${LOGNAME} GDB_FILE=gdb_tree.${LOGNAME}

View File

@@ -1,12 +1,19 @@
TREE_FILE=psim_tree.${LOGNAME} TREE_FILE=psim_tree.${LOGNAME}
case $0 in
*4.8*) rtemsTarget=powerpc-rtems4.8 ;;
*4.9*) rtemsTarget=powerpc-rtems4.9 ;;
*4.10*) rtemsTarget=powerpc-rtems4.10 ;;
*) ;;
esac
### Generate the PSIM device tree based upon the type of application being run ### Generate the PSIM device tree based upon the type of application being run
gen_device_tree() gen_device_tree()
{ {
enable_sys_ipc="yes" enable_sys_ipc="yes"
if [ ${use_sys_ipc} = "yes" ] ; then if [ ${use_sysv_ipc} = "yes" ] ; then
enable_sysv_ipc="yes" enable_sysv_ipc="yes"
value=-1 # for now assume we are slave in this mode value=-1 # for now assume we are slave in this mode
else else
@@ -65,8 +72,6 @@ EOF
echo "/shm@0x0c110000/reg 0x0c110000 0x20000" echo "/shm@0x0c110000/reg 0x0c110000 0x20000"
echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}" echo "/shm@0x0c110000/key ${RTEMS_SHM_KEY}"
fi fi
exit 0
} }
### run the specified test with the time limit ### run the specified test with the time limit

View File

@@ -13,10 +13,8 @@
# #
TREE_FILE=psim_tree.${LOGNAME} TREE_FILE=psim_tree.${LOGNAME}
if [ X${RUN} = X ] ; then
RUN=@target_alias@-run
fi
rtemsTarget=@target_alias@
progname=${0##*/} # fast basename hack for ksh, bash progname=${0##*/} # fast basename hack for ksh, bash