diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-30 21:17:38 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-30 21:17:38 +0000 |
commit | c08f442e983ae52f9c3dd7db5b5f37a5a897a4cb (patch) | |
tree | 23035b02a5b196b3a04389be7c907ed55fdd38a6 /sim-scripts | |
parent | 4aebcc87f5a813ff7cc23f9d81c18e7c439ffae9 (diff) |
2009-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* .cvsignore, Makefile, gdb-sim-run.in: Add QEMU Gumstix Connex
support.
* qemu-gumstix.in: New file.
Diffstat (limited to 'sim-scripts')
-rw-r--r-- | sim-scripts/.cvsignore | 1 | ||||
-rw-r--r-- | sim-scripts/ChangeLog | 6 | ||||
-rw-r--r-- | sim-scripts/Makefile | 5 | ||||
-rwxr-xr-x | sim-scripts/gdb-sim-run.in | 12 | ||||
-rw-r--r-- | sim-scripts/qemu-gumstix.in | 71 |
5 files changed, 88 insertions, 7 deletions
diff --git a/sim-scripts/.cvsignore b/sim-scripts/.cvsignore index 44eea9c..0b447d9 100644 --- a/sim-scripts/.cvsignore +++ b/sim-scripts/.cvsignore @@ -36,6 +36,7 @@ m32rsim-gdb pc386 psim psim-gdb +qemu-gumstix qemu-leon2 qemuppc rtl22xx diff --git a/sim-scripts/ChangeLog b/sim-scripts/ChangeLog index 6a99043..55bb810 100644 --- a/sim-scripts/ChangeLog +++ b/sim-scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-09-30 Joel Sherrill <joel.sherrill@oarcorp.com> + + * .cvsignore, Makefile, gdb-sim-run.in: Add QEMU Gumstix Connex + support. + * qemu-gumstix.in: New file. + 2009-09-27 Joel Sherrill <joel.sherrill@oarcorp.com> * avrtest.in, ezkit533.in, h8sim.in, jmr3904.in, lm32_evr.in, diff --git a/sim-scripts/Makefile b/sim-scripts/Makefile index 80f8596..feca9db 100644 --- a/sim-scripts/Makefile +++ b/sim-scripts/Makefile @@ -8,7 +8,7 @@ SKYEYE_SCRIPTS=ant5206 bf537Stamp csb337 csb350 csb360 edb7312 ezkit533 \ gumstix rtl22xx smdk2410 leon2-skyeye TSIM_SCRIPTS=erc32 leon2 leon3 -QEMU_SCRIPTS=pc386 qemuppc qemu-leon2 uC5282 +QEMU_SCRIPTS=pc386 qemuppc qemu-gumstix qemu-leon2 uC5282 OTHER_SCRIPTS=avrtest GENERATED_SCRIPTS=\ ${GDBSIM_SCRIPTS} $(GDBSIM_SCRIPTS:%=%-gdb) \ @@ -37,6 +37,9 @@ pc386: gdb-sim-run.in pc386.in qemuppc: gdb-sim-run.in qemuppc.in ./mkrun no PowerPC powerpc qemuppc +qemu-gumstix: gdb-sim-run.in qemu-gumstix.in + ./mkrun no ARM arm qemu-gumstix + qemu-leon2: gdb-sim-run.in qemu-leon2.in ./mkrun no SPARC sparc qemu-leon2 diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in index b9752b7..efda7fc 100755 --- a/sim-scripts/gdb-sim-run.in +++ b/sim-scripts/gdb-sim-run.in @@ -19,7 +19,6 @@ test_exit() exit $exit_code } - progname=${0##*/} # fast basename hack for ksh, bash USAGE=\ @@ -135,6 +134,7 @@ bspSupportsNIC="no" bspNeedsSttySane="yes" bspNeedsTraceConversion="no" bspRunsFailRandomly="no" +bspInputDevice=/dev/console for v in 4.10 4.9 4.8 4.7 "" do @@ -280,7 +280,7 @@ runtest() if [ ${max_run_time} -eq 0 ] ; then #echo run ${testname} forever - ${runBSP} `runARGS ${testname}` + ${runBSP} `runARGS ${testname}` <${bspInputDevice} return fi @@ -291,12 +291,12 @@ runtest() logfile=${logdir}/${tname} if [ ${bspSimTrustedToExit} = "yes" ] ; then - ${runBSP} `runARGS ${testname}` >${logfile} 2>&1 + ${runBSP} `runARGS ${testname}` <${bspInputDevice} >${logfile} 2>&1 catLog ${logfile} return fi - ${runBSP} `runARGS ${testname}` >${logfile} 2>&1 & + ${runBSP} `runARGS ${testname}` <${bspInputDevice} >${logfile} 2>&1 & pid=$! # Make sure it won't run forever... @@ -381,7 +381,7 @@ do if [ ${bspSupportsGDBServerMode} = "yes" -a ${gdb_server_mode} = "yes" ];then test ${verbose} == 'yes' && echo ${runBSP} `runARGS ${toRun}` - ${runBSP} `gdbServerARGS ${toRun}` + ${runBSP} `gdbServerARGS ${toRun}` <${bspInputDevice} exit 0 fi @@ -437,7 +437,7 @@ do # some BSPs produce trace oriented files which need to be converted # to object coverage maps - if [ ${bspNeedsTraceConversion} = "yes" ] ; then + if [ ${coverage} = "yes" -a ${bspNeedsTraceConversion} = "yes" ] ; then convertTraceToCoverageMap ${toRun} fi diff --git a/sim-scripts/qemu-gumstix.in b/sim-scripts/qemu-gumstix.in new file mode 100644 index 0000000..7977c11 --- /dev/null +++ b/sim-scripts/qemu-gumstix.in @@ -0,0 +1,71 @@ +# +# ARM/GumStix Connex Qemu Support +# +# $Id$ +# + +bspUsesGDBSimulator="no" +# bspGeneratesGDBCommands="yes" +# bspSupportsGDBServerMode="yes" +if [ -r ${HOME}/qemu-coverage/install/bin/qemu-system-arm ] ; then + runBSP=${HOME}/qemu-coverage/install/bin/qemu-system-arm +else + runBSP=qemu-system-arm +fi +bspNeedsTraceConversion="yes" +bspNeedsDos2Unix="yes" +bspGeneratesDeviceTree="yes" +bspInputDevice=qemu-gumstix.cmds +bspTreeFile=qemu-gumstix.cmds + +runARGS() +{ +# qemu-system-arm -M connex -m 289 -nographic -monitor null -pflash connex-flash.img <cmds >log + + UBOOT=${HOME}/qemu/u-boot-connex-400-r1604.bin + FLASH=connex-flash.img + ( dd of=${FLASH} bs=128k count=128 if=/dev/zero ; + dd of=${FLASH} bs=128k conv=notrunc if=${UBOOT} ; + dd of=${FLASH} bs=1k conv=notrunc seek=4096 if=${1} ) >/dev/null 2>&1 + + if [ ${coverage} = yes ] ; then + rm -f trace ${1}.tra + COVERAGE_ARG="-trace ${1}.tra" + fi + + echo "-M connex -m 289 -nographic -monitor null \ + -pflash ${FLASH} ${COVERAGE_ARG}" +} + +convertTraceToCoverageMap() +{ + # 512K of code space covered + trace_converter -l a0000000 -h a0080000 -f QEMU ${1}.tra ${1}.cov +} + +checkBSPFaults() +{ + return 0 +} + +bspLimit() +{ + testname=$1 + case ${testname} in + *stackchk*)limit=5 ;; + *fatal*) limit=1 ;; + *psxtime*) limit=180 ;; + *) limit=60 ;; + esac + echo ${limit} +} + +### Generate the commands we boot with +bspGenerateDeviceTree() +{ +cat >qemu-gumstix.cmds <<EOF + +bootelf 0x400000 + +EOF +} |