From 12c31d11c633a86b73df447438388b354e3c18e6 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 29 Mar 2015 11:00:58 -0500 Subject: Add support for erc32, leon2 and leon3 in GDB SIS --- sim-scripts/.gitignore | 4 ++++ sim-scripts/Makefile | 11 +++++++++- sim-scripts/erc32.in | 28 +++++++++++++++++++++---- sim-scripts/leon2.in | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ sim-scripts/leon3.in | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 148 insertions(+), 5 deletions(-) create mode 100644 sim-scripts/leon2.in create mode 100644 sim-scripts/leon3.in (limited to 'sim-scripts') diff --git a/sim-scripts/.gitignore b/sim-scripts/.gitignore index 95a8329..30df64f 100644 --- a/sim-scripts/.gitignore +++ b/sim-scripts/.gitignore @@ -31,8 +31,12 @@ leon2 leon2-gdb leon2-skyeye leon2-skyeye-gdb +leon2-tsim +leon2-tsim-gdb leon3 leon3-gdb +leon3-tsim +leon3-tsim-gdb lm32_evr lm32_evr-gdb lm3s6965 diff --git a/sim-scripts/Makefile b/sim-scripts/Makefile index 3782b04..4b5ef40 100644 --- a/sim-scripts/Makefile +++ b/sim-scripts/Makefile @@ -1,6 +1,6 @@ INSTALL_DIR=../bin GDBSIM_SCRIPTS=bf537Stamp ezkit533 gdbarmsim h8sim jmr3904 lm32_evr \ - m32csim m32rsim or1ksim psim sis simsh v850sim + m32csim m32rsim or1ksim psim sis erc32 leon2 leon3 simsh v850sim SKYEYE_SCRIPTS=ant5206 bf537Stamp-skyeye csb337 csb350 csb360 edb7312 \ ezkit533-skyeye gumstix rtl22xx smdk2410 leon2-skyeye @@ -142,6 +142,15 @@ psim psim-gdb: gdb-sim-run.in gdb-sim.in psim.in sis sis-gdb: gdb-sim-run.in gdb-sim.in sis.in ./mkrun yes SPARC sparc sis +erc32 erc32-gdb: gdb-sim-run.in gdb-sim.in erc32.in + ./mkrun yes SPARC sparc erc32 + +leon2 leon2-gdb: gdb-sim-run.in gdb-sim.in leon2.in + ./mkrun yes SPARC sparc leon2 + +leon3 leon3-gdb: gdb-sim-run.in gdb-sim.in leon3.in + ./mkrun yes SPARC sparc leon3 + simsh simsh-gdb: gdb-sim-run.in gdb-sim.in simsh.in ./mkrun yes SuperH sh simsh diff --git a/sim-scripts/erc32.in b/sim-scripts/erc32.in index 984d426..08060a2 100644 --- a/sim-scripts/erc32.in +++ b/sim-scripts/erc32.in @@ -1,8 +1,28 @@ # -# SPARC/ERC32 Support (on TSIM) +# SPARC/SIS Support for ERC32 # -tsimName=erc32 -tsimGoAddress=0x2000000 +runARGS() +{ + echo "-m 64 ${1}" +} -##INSERT TSIM SUPPORT HERE +checkBSPFaults() +{ + logfile=$1 + grep "^Memory exception at " ${logfile} + badAccessExit=$? + if [ $badAccessExit -eq 0 ] ; then + return 1 + fi + return 0 +} + +bspLimit() +{ + testname=$1 + case ${testname} in + *) limit=180 ;; + esac + echo ${limit} +} diff --git a/sim-scripts/leon2.in b/sim-scripts/leon2.in new file mode 100644 index 0000000..4333ad2 --- /dev/null +++ b/sim-scripts/leon2.in @@ -0,0 +1,55 @@ +# +# SPARC/SIS Support for LEON2 +# + +## Not really a device tree file but a command file +bspGeneratesDeviceTree="yes" +bspTreeFile=leon2_cmds.${LOGNAME} + +runBSP=`echo ${defaultRUN} | sed -e 's/run/sis/'` + +# Simulator provides 16 MB memory +runARGS() +{ + echo "-leon2 -c ${bspTreeFile} ${1}" +} + +checkBSPFaults() +{ + logfile=$1 + grep "^Memory exception at " ${logfile} + badAccessExit=$? + if [ $badAccessExit -eq 0 ] ; then + return 1 + fi + return 0 +} + +bspLimit() +{ + testname=$1 + case ${testname} in + *) limit=180 ;; + esac + echo ${limit} +} + +### Generate the SIS command file +bspGenerateDeviceTree() +{ +cat <${bspTreeFile} +run +quit +EOF +} + +## We have to pass in an argument to gdb to select the CPU +bspGeneratesGDBCommands="yes" + +bspGenerateGDBCommands() +{ +cat <${bspTreeFile} +run +quit +EOF +} + +## We have to pass in an argument to gdb to select the CPU +bspGeneratesGDBCommands="yes" + +bspGenerateGDBCommands() +{ +cat <