diff options
Diffstat (limited to 'run_model.sh')
-rwxr-xr-x | run_model.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/run_model.sh b/run_model.sh new file mode 100755 index 0000000..27e3dab --- /dev/null +++ b/run_model.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# This proprietary software may be used only as authorised by a licensing +# agreement from ARM Limited +# (C) COPYRIGHT 2019 ARM Limited +# The entire notice above must be reproduced on all authorised copies and +# copies may only be made to the extent permitted by a licensing agreement from +# ARM Limited. + +# Set your ARMLMD_LICENSE_FILE License path for FVP licenses before running this script + +# Get full absolute path to the directory of this file +pushd $(dirname "$0") +BASEDIR=$(pwd) +popd +OUTDIR=${BASEDIR}/../build-iota-tiny/tmp-iota_tiny/deploy/images/corstone700 + +help() { + echo "usage: run_model.sh \${FVP executable path} [ -u ]" + echo " -u: Run unit test selector" + echo " No additional argument: load and execute model" + exit 1 +} + +# Ensure that an FVP path has been provided +if [ -z "$1" ] +then + help +fi + +if [ -z "$2" ] +then + echo "================== Launching Corstone700 Model ===============================" + $1 \ + -C se.trustedBootROMloader.fname="${OUTDIR}/se_romfw.bin" \ + -C board.flashloader0.fname="${OUTDIR}/iota-tiny-image-corstone700.wic" + +elif [ "$2" == "-u" ] +then + # We assume that the FVP library model is identically named to the FVP executable. + python ${BASEDIR}/scripts/test/testselector.py \ + --corstone700 "--image_dir ${OUTDIR} --fvp ${1}.so" +else + help +fi + |