diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2019-05-17 07:28:22 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-05-17 07:28:22 +0000 |
commit | 16a32f7e388fc3246b1e1d06c815a0fa09cd7818 (patch) | |
tree | bb892f0c8949550fcba0111186e559998a47ff0f | |
parent | 2755ecb5dcab5fac6295245a15afaecfff8eba78 (diff) | |
parent | 7c5df58ddbb2c55a0ef16d1e8d9ae3f3d2f4c73e (diff) | |
download | tf-a-tests-16a32f7e388fc3246b1e1d06c815a0fa09cd7818.tar.gz |
Merge changes from topic "sb/el3-payload"
* changes:
run_armds_script.sh: Ask user which DSTREAM to connect to
Adapt run_ds5_script.sh for recent Arm DS versions
-rw-r--r-- | el3_payload/Makefile | 4 | ||||
-rwxr-xr-x | el3_payload/scripts/juno/run_armds_script.sh (renamed from el3_payload/scripts/juno/run_ds5_script.sh) | 36 |
2 files changed, 26 insertions, 14 deletions
diff --git a/el3_payload/Makefile b/el3_payload/Makefile index 9e6fe04d2..984f60d55 100644 --- a/el3_payload/Makefile +++ b/el3_payload/Makefile @@ -69,8 +69,8 @@ distclean: clean run: run_${PLAT} -run_juno: ${ELF} scripts/juno/run_ds5_script.sh scripts/juno/load_el3_payload.ds - scripts/juno/run_ds5_script.sh scripts/juno/load_el3_payload.ds +run_juno: ${ELF} scripts/juno/run_armds_script.sh scripts/juno/load_el3_payload.ds + scripts/juno/run_armds_script.sh scripts/juno/load_el3_payload.ds run_fvp: scripts/fvp/run_fvp.sh scripts/fvp/run_fvp.sh diff --git a/el3_payload/scripts/juno/run_ds5_script.sh b/el3_payload/scripts/juno/run_armds_script.sh index 67d07365a..d9763b448 100755 --- a/el3_payload/scripts/juno/run_ds5_script.sh +++ b/el3_payload/scripts/juno/run_armds_script.sh @@ -1,48 +1,60 @@ -#! /bin/sh +#! /bin/bash set -e # Expect the script to run in argument if [ $# != 1 ]; then echo "ERROR: No script provided" - echo "usage: $(basename $0) <ds5_script_to_run>" + echo "usage: $(basename $0) <armds_script_to_run>" exit 1 fi # Is DS-5 command-line debugger found? -if [ ! $(which debugger) ]; then +if [ ! $(which armdbg) ]; then echo 'ERROR: Failed to find DS-5 command-line debugger.' - echo 'Please add the path to the command-line debugger in your PATH.' + echo 'Please add the path to the armdbg program in your PATH.' echo 'E.g.: export PATH=<DS-5 install dir>/bin:$PATH' exit 1 fi # DS-5 configuration database entry for Juno r0 -juno_cdb_entry='ARM Development Boards::Juno ARM Development Platform (r0)::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A53_0::DSTREAM' +juno_cdb_entry='Arm::Juno Arm Development Platform (r0)::Bare Metal Debug::Bare Metal Debug::Debug Cortex-A53_0::DSTREAM' # Browse for available DSTREAM connections and lists targets that match the # connection type specified in the configuration database entry echo "Trying to detect your DSTREAM unit..." connections_list=available_connections -debugger --cdb-entry "$juno_cdb_entry" --browse \ +armdbg --cdb-entry "$juno_cdb_entry" --browse \ | tee $connections_list # Remove first line in the file (i.e. "Available connections:") tail -n +2 $connections_list > ${connections_list}_stripped mv ${connections_list}_stripped ${connections_list} -# Use first available connection -read connection < $connections_list || true -rm $connections_list +if [ ! -s $connections_list ] ; then + echo "ERROR: Found no connection" + exit 1 +fi + +# Ask the user which connection to use. +echo +cat -n $connections_list +echo -n "Which one do you want to connect to? " +read connection_id +# Extract the corresponding connection name from the file. +connection=$(((sed -n "${connection_id}p") | sed 's/^ *//') < $connections_list) if [ -z "$connection" ] ; then - echo "ERROR: Found no connection" - exit 1 + echo "ERROR: Invalid connection" + exit 1 fi +rm $connections_list + # Run DS-5 script +echo echo "Connecting to $connection..." -debugger \ +armdbg \ --cdb-entry "$juno_cdb_entry" \ --cdb-entry-param "Connection=$connection" \ --stop_on_connect=false \ |