diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-05-29 15:24:31 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-05-29 15:44:27 -0500 |
commit | 4856251217b0c51f50c9fc508f51a7cbf7984e1c (patch) | |
tree | 088c0e8193a0f00b1ba190946d91f9dcf3883bf7 /sim-scripts/gdb-sim-run.in | |
parent | rtems-gdb-macros-4.11: Update to work with current RTEMS git head (diff) | |
download | rtems-testing-4856251217b0c51f50c9fc508f51a7cbf7984e1c.tar.bz2 |
sim-scripts: Add initial support for specifying number of cores
Attempted to add support to pc386 (untested).
Diffstat (limited to 'sim-scripts/gdb-sim-run.in')
-rwxr-xr-x | sim-scripts/gdb-sim-run.in | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in index 9da325d..1870b0a 100755 --- a/sim-scripts/gdb-sim-run.in +++ b/sim-scripts/gdb-sim-run.in @@ -29,13 +29,14 @@ USAGE=\ -N -- enable use of network adapter (default=no) -G -- put simulator in GDB server mode (default=no) -i -- interactive (default=no time limit) + -p cores -- number of cores for SMP (default=1) -s -- force System V IPC support (default=no) -S -- skip Interrupt Critical Section Tests (default=no) -l limit -- specify time limit (default is 'BSP dependent') -L dir -- specify log directory (default is 'log') - -T -- rtems-test command mode NOTES: + + Most simulators do not support multicore support. + System V IPC and Coverage are not supported by all BSPs or simulators. + GDB Server mode is only supported by stand-along simulators. + When you generate a device tree and exit, remember to specify an @@ -86,10 +87,10 @@ logdir="log" doTrace="no" enable_display_adapter="no" enable_network="no" -rtems_test="no" skip_interrupt_critical_section_tests="no" +number_of_cores=1 -while getopts "vcCgGil:L:DsNT" OPT +while getopts "vcCgGil:L:p:DsNT" OPT do case "$OPT" in v) verbose="yes";; @@ -102,10 +103,10 @@ do i) interactive="yes";; l) defaultLimit="$OPTARG";; L) logdir="$OPTARG";; + p) number_of_cores="$OPTARG";; s) use_sysv_ipc="yes";; S) skip_interrupt_critical_section_tests="yes";; t) doTrace="yes";; - T) rtems_test="yes";; *) fatal;; esac done @@ -115,6 +116,18 @@ shift $shiftcount args=$* +case ${number_of_cores} in + [1-9]) ;; + 0) + echo "Zero cores does not make sense" + exit 1 + ;; + *) + echo "Cores specified (${number_of_cores}) is either not a valid" + echo " number or supported quantity." + exit 1 +esac + if [ ${interactive} = "yes" ] ; then defaultLimit=0 else @@ -138,6 +151,7 @@ bspRunsFailRandomly="no" bspInputDevice=/dev/console bspRedirectInput=no bspSkipInterruptCriticalSectionTests="no" +bspSupportsSMP="no" for v in 4.11 4.10 4.9 4.8 4.7 "" do @@ -168,12 +182,18 @@ if [ ${bspSupportsNIC} = "no" -a ${enable_network} = "yes" ]; then echo "Simulator does not support a Network Interface Controller." exit 1 fi + if [ ${bspSupportsDisplayAdapter} = "no" -a \ ${enable_display_adapter} = "yes" ]; then echo "Simulator does not support Graphics Display Adapter." exit 1 fi +if [ ${bspSupportsSMP} = "no" -a ${number_of_cores} != 1 ] ; then + echo "Simulator does not support multiple cores." + exit 1 +fi + if [ X${runBSP} = X ] ; then echo "Unable to find a way to run @CPU_TARGET@/@BSP@" exit 1 |