#!/bin/bash # -------------------------------------------------------------------------------- # @Title: Bash script to start TRACE32 # @Description: # Script to start the TRACE32 tool for 32-Bit ARM # Assumes that Environment Variable "T32_SYS" is set to the desired version # Usage: # ./start_amp_session.sh # ./start_amp_session.sh # Other core(s) will be started by the practice script. # @Props: NoWelcome NoMetaTags Template # @Copyright: (C) 1989-2018 Lauterbach GmbH, licensed for use with TRACE32(R) only # -------------------------------------------------------------------------------- # ppwd will be the absolute path to the current bash script export ppwd=$( cd $(dirname "$0") && pwd) if [ ! ${T32_SYS} ]; then echo "ERROR: Please specify T32_SYS variable" exit 1 fi if [ $# -eq 0 ]; then echo "Usage:" echo "./start_amp_session.sh " echo "./start_amp_session.sh " exit 1 fi #Use a random port to allow multiple sessions from multiple users P1_PORT=$((10000+$RANDOM)) P2_TITLE=ARM_RPU_CORE0 P3_TMP=/tmp P4_SYS=${T32_SYS} P9_TCF=30000 # Parameters for Ethernet connection P5_PBI=NET P6_OPT=NODE=${1} P7_OPT=PACKLEN=1024 P8_OPT=CORE=1 # Detect the system is 32bit or 64bit MACHINE='pc_linux' MACHINE_TYPE=`uname -m` if [ $MACHINE_TYPE == 'x86_64' ]; then MACHINE='pc_linux64' fi cd ${ppwd} # Last but not least start TRACE32 # Common Syntax: # t32m -c .t32 [ [] [...]] [-s [ [...]]] ${P4_SYS}/bin/${MACHINE}/t32marm -graphicssystem raster -c "${ppwd}/config_amp.t32" ${P1_PORT} ${P2_TITLE} ${P3_TMP} ${P4_SYS} ${P5_PBI} ${P6_OPT} ${P7_OPT} ${P8_OPT} ${P9_TCF}