forked from Imagelibrary/rtems
2009-09-11 Till Straumann <Till.Straumann@TU-Berlin.de>
* psim-top.in, psim-bottom: Added support for options -d (print device tree and exit), -h (usage info) and -n (enable NIC support). * psim-gdb-bottom: Added support for options -s (force sysv IPC), -h (usage info) and -n (enable NIC support). Allow user to override GDB variable from environment. * psim-shared: cat NIC properties into device file if the user had specified '-n'. * runtest-top.in: removed unsupported options -o, -d from usage info.
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
2009-09-11 Till Straumann <Till.Straumann@TU-Berlin.de>
|
||||
|
||||
* psim-top.in, psim-bottom: Added support for options
|
||||
-d (print device tree and exit), -h (usage info) and
|
||||
-n (enable NIC support).
|
||||
|
||||
* psim-gdb-bottom: Added support for options -s (force sysv IPC),
|
||||
-h (usage info) and -n (enable NIC support).
|
||||
Allow user to override GDB variable from environment.
|
||||
|
||||
* psim-shared: cat NIC properties into device file if the
|
||||
user had specified '-n'.
|
||||
|
||||
* runtest-top.in: removed unsupported options -o, -d from
|
||||
usage info.
|
||||
|
||||
2009-04-14 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* psim-gdb-bottom: Adapt name of assert function for breakpoint
|
||||
|
||||
@@ -7,15 +7,20 @@
|
||||
verbose=""
|
||||
limit="0"
|
||||
use_sysv_ipc="auto"
|
||||
device_tree_only=""
|
||||
enable_if_sim=""
|
||||
|
||||
## TODO: may want command line ability to turn on some psim tracing
|
||||
while getopts vsl: OPT
|
||||
while getopts vhsdnl: OPT
|
||||
do
|
||||
case "$OPT" in
|
||||
v) verbose="yes";;
|
||||
l) limit="$OPTARG";;
|
||||
s) use_sysv_ipc="yes";;
|
||||
*) fatal;;
|
||||
h) echo "$USAGE"; exit 0;;
|
||||
l) limit="$OPTARG";;
|
||||
s) use_sysv_ipc="yes";;
|
||||
d) device_tree_only="yes";;
|
||||
n) enable_if_sim="yes";;
|
||||
*) fatal;;
|
||||
esac
|
||||
done
|
||||
shiftcount=`expr $OPTIND - 1`
|
||||
@@ -27,6 +32,11 @@ if [ $# -eq 0 ] ; then
|
||||
fatal
|
||||
fi
|
||||
|
||||
if [ X${device_tree_only} = Xyes ] ; then
|
||||
gen_device_tree ${1} > "`basename ${1} .exe`".device
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ X${RUN} = X ] ; then
|
||||
RUN=${rtemsTarget}-run
|
||||
fi
|
||||
|
||||
@@ -1,8 +1,31 @@
|
||||
progname=${0##*/} # fast basename hack for ksh, bash
|
||||
|
||||
## TODO: may want command line ability to turn on some psim tracing
|
||||
USAGE=\
|
||||
"usage: $progname [ -opts ] [prog]
|
||||
-s -- force System V IPC support on (default=auto)
|
||||
-n -- enable NIC support ***REQUIRES PATCHED GDB/PSIM***
|
||||
-h -- this message
|
||||
"
|
||||
|
||||
# Recognize special argument to force System V IPC support on
|
||||
use_sysv_ipc="auto"
|
||||
enable_if_sim=""
|
||||
|
||||
## TODO: may want command line ability to turn on some psim tracing
|
||||
while getopts snh OPT
|
||||
do
|
||||
case "$OPT" in
|
||||
s) use_sysv_ipc="yes";;
|
||||
n) enable_if_sim="yes";;
|
||||
h) echo "$USAGE"; exit 0;;
|
||||
*) echo "unknown option"; echo "$USAGE"; exit 0;;
|
||||
esac
|
||||
done
|
||||
shiftcount=`expr $OPTIND - 1`
|
||||
shift $shiftcount
|
||||
|
||||
args=$*
|
||||
|
||||
if [ X${1} = "X-psim_sysv" ] ; then
|
||||
use_sysv_ipc="yes"
|
||||
shift
|
||||
@@ -20,7 +43,9 @@ gen_gdb_script()
|
||||
echo "printf \"Use run to start the RTEMS application\\n\""
|
||||
}
|
||||
|
||||
GDB=${rtemsTarget}-gdb
|
||||
if [ X${GDB} = X ] ; then
|
||||
GDB=${rtemsTarget}-gdb
|
||||
fi
|
||||
|
||||
gen_device_tree ${1} >${TREE_FILE}
|
||||
gen_gdb_script >${GDB_FILE}
|
||||
|
||||
@@ -44,7 +44,7 @@ gen_device_tree()
|
||||
RAM_SIZE=`$NM ${1} | awk '/\<RamSize\>/{print "0x"$1}'`
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
cat <<EOF
|
||||
#
|
||||
# Device Tree for PSIM
|
||||
#
|
||||
@@ -75,36 +75,41 @@ cat <<EOF
|
||||
/opic@0x0c130000/device_type open-pic
|
||||
# interupt out -> CPU's interrupt pin
|
||||
/opic@0x0c130000 > intr0 int /cpus/cpu@0
|
||||
|
||||
##### ETHTAP @ 0x0c100020 for 0x40
|
||||
##
|
||||
## NOTE 'ethtap' currently (200902) requires psim to
|
||||
## be patched -- also, it is only supported on
|
||||
## a linux host.
|
||||
## the 'ethtap' device transfers data from/to the
|
||||
## simulated network interface to/from a 'ethertap'
|
||||
## interface on the linux host (consult tun/tap
|
||||
## device documentation).
|
||||
## A very useful tool is 'tunctl' which allows for
|
||||
## configuring user-accessible, persistent 'tap'
|
||||
## devices so that psim may be executed w/o special
|
||||
## (root) privileges.
|
||||
#
|
||||
#/ethtap@0x0c100020/reg 0x0c100020 0x40
|
||||
## route interrupt to open-pic
|
||||
#/ethtap@0x0c100020 > 0 irq0 /opic@0x0c130000
|
||||
## 'tun' device on host
|
||||
#/ethtap@0x0c100020/tun-device "/dev/net/tun"
|
||||
## name of 'tap' device to use
|
||||
#/ethtap@0x0c100020/tap-ifname "tap0"
|
||||
## ethernet address of simulated IF
|
||||
#/ethtap@0x0c100020/hw-address "00:00:00:22:11:00"
|
||||
## generate CRC and append to received packet before
|
||||
## handing over to the simulation. This is mostly for
|
||||
## debugging the rtems device driver. If unsure, leave 'false'.
|
||||
#/ethtap@0x0c100020/enable-crc false
|
||||
EOF
|
||||
|
||||
if [ X${enable_if_sim} = Xyes ] ; then
|
||||
cat <<EOF
|
||||
|
||||
#### ETHTAP @ 0x0c100020 for 0x40
|
||||
#
|
||||
# NOTE 'ethtap' currently (200902) requires psim to
|
||||
# be patched -- also, it is only supported on
|
||||
# a linux host.
|
||||
# the 'ethtap' device transfers data from/to the
|
||||
# simulated network interface to/from a 'ethertap'
|
||||
# interface on the linux host (consult tun/tap
|
||||
# device documentation).
|
||||
# A very useful tool is 'tunctl' which allows for
|
||||
# configuring user-accessible, persistent 'tap'
|
||||
# devices so that psim may be executed w/o special
|
||||
# (root) privileges.
|
||||
|
||||
/ethtap@0x0c100020/reg 0x0c100020 0x40
|
||||
# route interrupt to open-pic
|
||||
/ethtap@0x0c100020 > 0 irq0 /opic@0x0c130000
|
||||
# 'tun' device on host
|
||||
/ethtap@0x0c100020/tun-device "/dev/net/tun"
|
||||
# name of 'tap' device to use
|
||||
/ethtap@0x0c100020/tap-ifname "tap0"
|
||||
# ethernet address of simulated IF
|
||||
/ethtap@0x0c100020/hw-address "00:00:00:22:11:00"
|
||||
# generate CRC and append to received packet before
|
||||
# handing over to the simulation. This is mostly for
|
||||
# debugging the rtems device driver. If unsure, leave 'false'.
|
||||
/ethtap@0x0c100020/enable-crc false
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ ${enable_sysv_devices} = yes ] ; then
|
||||
echo "##### System V IPC (Semaphore) 0x0c100010 for 12"
|
||||
echo "/sem@0x0c100010/reg 0x0c100010 12"
|
||||
|
||||
@@ -20,9 +20,12 @@ progname=${0##*/} # fast basename hack for ksh, bash
|
||||
|
||||
USAGE=\
|
||||
"usage: $progname [ -opts ] test [ test ... ]
|
||||
-v -- verbose
|
||||
-s -- force System V IPC support on (default=auto)
|
||||
-l limit -- specify time limit (default is 'no limit')
|
||||
-v -- verbose
|
||||
-h -- this message
|
||||
-s -- force System V IPC support on (default=auto)
|
||||
-l limit -- specify time limit (default is 'no limit')
|
||||
-d -- generate device tree as 'test'.device and exit
|
||||
-n -- enable NIC support ***REQUIRES PATCHED PSIM***
|
||||
"
|
||||
|
||||
# log an error to stderr
|
||||
|
||||
@@ -23,10 +23,8 @@ fi
|
||||
|
||||
USAGE=\
|
||||
"usage: $progname [ -opts ] test [ test ... ]
|
||||
-o options -- specify options to be passed to simulator
|
||||
-v -- verbose
|
||||
-d -- generate device tree file (as 'test'.device) and exit
|
||||
-l logdir -- specify log directory (default is 'logdir')
|
||||
-v -- verbose
|
||||
-l logdir -- specify log directory (default is 'logdir')
|
||||
|
||||
Specify test as 'test' or 'test.exe'.
|
||||
All multiprocessing tests *must* be specified simply as 'mp01', etc.
|
||||
|
||||
Reference in New Issue
Block a user