Changeset 2e284ff in rtems-testing


Ignore:
Timestamp:
Jan 20, 2009, 1:11:22 AM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 8895273c193787f84c4585a10f6d6aceb3b25dc4
Children:
9cb0643
Parents:
82cce79
Message:

2009-01-19 Joel Sherrill <joel.sherrill@…>

  • .cvsignore, Makefile, gdb-sim-run.in, gdb-sim.in: Add psim support.
  • psim.in: New file.
Location:
sim-scripts
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • sim-scripts/.cvsignore

    r82cce79 r2e284ff  
    77m32rsim
    88m32rsim-gdb
     9psim
     10psim-gdb
    911simsh
    1012simsh-gdb
  • sim-scripts/ChangeLog

    r82cce79 r2e284ff  
     12009-01-19      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * .cvsignore, Makefile, gdb-sim-run.in, gdb-sim.in: Add psim support.
     4        * psim.in: New file.
     5
    162009-01-19      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • sim-scripts/Makefile

    r82cce79 r2e284ff  
    55INSTALL_DIR=../bin
    66GENERATED_SCRIPTS=h8sim h8sim-gdb jmr3904 jmr3904-gdb m32csim m32csim-gdb \
    7   m32rsim m32rsim-gdb sis sis-gdb simsh simsh-gdb
     7  m32rsim m32rsim-gdb psim psim-gdb sis sis-gdb simsh simsh-gdb
    88COMPILED_PROGRAMS=usleep
    99
     
    2727m32rsim m32rsim-gdb: gdb-sim-run.in gdb-sim.in m32rsim.in
    2828        ./mkrun M32R m32r m32rsim
     29
     30psim psim-gdb: gdb-sim-run.in gdb-sim.in psim.in
     31        ./mkrun PowerPC powerpc psim
    2932
    3033sis sis-gdb: gdb-sim-run.in gdb-sim.in sis.in
  • sim-scripts/gdb-sim-run.in

    r82cce79 r2e284ff  
    2424"usage: $progname [ -opts ] test [ test ... ]
    2525        -v         -- verbose
    26         -c         -- enabled coverage (not supported by all BSPs)
    27         -i         -- interactive (no time limit)
     26        -c         -- enabled coverage (default=no)
     27        -i         -- interactive (default=no time limit)
     28        -s         -- force System V IPC support (default=no)
    2829        -l limit   -- specify time limit (default is 'BSP dependent')
     30
     31System V IPC and Coverage are not supported by all BSPs or simulators.
    2932"
    3033
     
    5558limit="not_set"
    5659interactive="no"
    57 
    58 while getopts vil: OPT
     60use_sysv_ipc="no"
     61
     62while getopts vil:s OPT
    5963do
    60     case "$OPT" in
    61         v) verbose="yes";;
    62         c) coverage="yes";;
    63         i) interactive="yes";;
    64         l) limit="$OPTARG";;
    65         *) fatal;;
    66     esac
     64 case "$OPT" in
     65   v) verbose="yes";;
     66   c) coverage="yes";;
     67   i) interactive="yes";;
     68   l) limit="$OPTARG";;
     69   s) use_sysv_ipc="yes";;
     70   *) fatal;;
     71 esac
    6772done
     73
    6874shiftcount=`expr $OPTIND - 1`
    6975shift $shiftcount
     
    7884bspRunFatal="no"
    7985bspGeneratesDeviceTree="no"
     86bspSupportsSystemVIPC="no"
    8087
    8188rtemsVersion=`echo ${progname} | sed -e 's/@BSP@-//' -e 's/-gdb//'`
     
    8996###################################################################
    9097###################################################################
     98
     99if [ ${bspSupportsSystemVIPC} = "no" -a ${use_sysv_ipc} = "yes"  ]; then
     100  echo "Simulator does not support System V IPC."
     101  exit 1
     102fi
    91103
    92104## These are faults any BSP may generate.  They are common to RTEMS.
     
    169181fi
    170182
    171 ## Some BSPs must generate device trees to provide to the simulator
    172 if [ ${bspGeneratesDeviceTree} = "yes" ] ; then
    173   bspGenerateDeviceTree
    174 fi
    175 
    176183## Now run the tests
    177184for toRun in $args
    178185do
    179   case `basename ${toRun}` in
     186  baseToRun=`basename ${toRun}`
     187  case ${baseToRun} in
    180188    *-node*) testtype="mp"     ;;
    181189    *fatal*) testtype="fatal"  ;;
     
    183191  esac
    184192
     193  ## Some BSPs must generate device trees to provide to the simulator
     194  if [ ${bspGeneratesDeviceTree} = "yes" ] ; then
     195    TREE_FILE=psim_tree.${LOGNAME}
     196    bspGenerateDeviceTree ${baseToRun} >${TREE_FILE}
     197  fi
     198
    185199  if [ ${interactive} = "yes" ] ; then
    186     echo INTERACTIVE runtest ${toRun} ${testtype} 0
     200    runtest ${toRun} ${testtype} 0
    187201    continue
    188202  fi
     
    219233  test ${verbose} = "yes" && runtest ${toRun} ${testtype} ${limit}
    220234  runtest ${toRun} ${testtype} ${limit}
     235
     236  if [ ${bspGeneratesDeviceTree} = "yes" ] ; then
     237    rm -f @BSP@_tree.${LOGNAME}
     238  fi
    221239done
    222240
    223 if [ ${bspGeneratesDeviceTree} = "yes" ] ; then
    224   bspCleanDeviceTree
    225 fi
    226 
    227241exit $?
    228242
  • sim-scripts/gdb-sim.in

    r82cce79 r2e284ff  
    3838###################################################################
    3939
     40## Some BSPs must generate device trees to provide to the simulator
     41if [ ${bspGeneratesDeviceTree} = "yes" ] ; then
     42  TREE_FILE=@BSP@_tree.${LOGNAME}
     43  bspGenerateDeviceTree ${baseToRun} >${TREE_FILE}
     44fi
     45
     46### generate bsp specific load command
    4047if [ ${bspGeneratesGDBCommands} = "no" ] ; then
    4148  cat <<EOF
     
    4754fi >@BSP@-cmds
    4855
     56###  Add CPU specific commands
     57case @CPU@ in
     58  powerpc) echo  "b C_exception_handler" ;;
     59  *)       ;;
     60esac >>@BSP@-cmds
     61
     62###  Add generic commands which break on known bad places
     63cat >>@BSP@-cmds <<EOF
     64b _Internal_error_Occurred
     65b rtems_fatal_error_occurred
     66b __assert
     67printf "Use run to start the RTEMS application\\n"
     68EOF
     69
    4970${GDB} --command=@BSP@-cmds $*
    5071
     72if [ ${bspGeneratesDeviceTree} = "yes" ] ; then
     73  rm -f @BSP@_tree.${LOGNAME}
     74fi
    5175test_exit $?
Note: See TracChangeset for help on using the changeset viewer.