Replaced startup script current lauterbach 2020_09 version. Shall be used with setup-lm lauterbach r_2020_09

This commit is contained in:
Kai-Bjoern Gemlau
2021-04-19 14:26:15 +02:00
parent cea4efea3e
commit 34b517b2e7

View File

@@ -1,42 +1,46 @@
#!/bin/bash
# --------------------------------------------------------------------------------
# @Title: Bash script to start TRACE32 with AMP mode
# @Title: Bash script to start TRACE32
# @Description:
# Linux/MacOS bash script for a one-click start of the amp demo. It assumes
# TRACE32 is installed to /opt/t32, modify it to fit your needs.
# Usage USB:
# ./amp_demo_start_session0.sh
# Usage Ethernet:
# ./amp_demo_start_session0.sh <ip>
# ./amp_demo_start_session0.sh <dns-name>
# Other core(s) will be started by the t32_amp.cmm practice script.
# 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 <ip>
# ./start_amp_session.sh <dns-name>
# Other core(s) will be started by the practice script.
# @Props: NoWelcome NoMetaTags Template
# @Copyright: (C) 1989-2016 Lauterbach GmbH, licensed for use with TRACE32(R) only
# @Copyright: (C) 1989-2018 Lauterbach GmbH, licensed for use with TRACE32(R) only
# --------------------------------------------------------------------------------
# $Id: amp_demo_start_session0.sh 10188 2016-11-18 08:23:44Z amerkle $
# ppwd will be the absolute path to the current bash script
export ppwd=$( cd $(dirname "$0") && pwd)
P1_PORT=$((10000+$RANDOM))
P2_TITLE=ARM_AMP_CORE0
P3_TMP=/tmp
P4_SYS=/tools/lauterbach/r_2018_02
P9_TCF="$((20000+$RANDOM))"
if [[ ! ${1} ]]; then
echo "Please specify lauterbach hostname"
exit -1
else
# Parameters for Ethernet connection
P5_PBI=NET
P6_OPT=NODE=${1}
P7_OPT=PACKLEN=1024
P8_OPT=CORE=1
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 <ip>"
echo "./start_amp_session.sh <dns-name>"
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`
@@ -44,21 +48,8 @@ if [ $MACHINE_TYPE == 'x86_64' ]; then
MACHINE='pc_linux64'
fi
if [ ! -x ${T32MARCH_EXE} ]; then
echo "t32marm-qt not found."
echo "Please check that P4_SYS is set to your TRACE32 system directory."
echo "(Current value: ${P4_SYS})"
pause
exit -1
else
# set T32SYS environment variable
export T32SYS=${P4_SYS}
fi
cd ${ppwd}
# Last but not least start TRACE32
${T32SYS}/bin/${MACHINE}/t32marm-qt \
-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}
# Common Syntax:
# t32m<arch> -c <ConfigFile>.t32 [<param> [<param>] [...]] [-s <StartupScript> [<param> [...]]]
${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}