#!/bin/bash # SETUP_DIR - Environment variable point to this script's directory export SETUP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" # *** Insert any custom environment variables needed *** # ******************************************************* doesDialityDirExist=false # Check if this script is called from a Diality machine by checking the location that VectorCAST has been installed if [[ -d /opt/VectorCASTSP3 ]]; then doesDialityDirExist=true fi # VECTORCAST_DIR - Environment variable pointing to the base directory for VectorCAST if [ "$doesDialityDirExist" == false ]; then export VECTORCAST_DIR=/usr/local/vcast/ else export VECTORCAST_DIR=~/vcast fi # VECTOR_LICENSE_FILE - Environment variable pointing to the license file if [ "$doesDialityDirExist" == false ]; then export VECTOR_LICENSE_FILE=/usr/local/flexlm/licenses/license.dat else export VECTOR_LICENSE_FILE=27000@dvm-util01 fi # VCAST_COMPILER_DIR - Environment variable pointing to the base directory of compiler installation export VCAST_COMPILER_DIR=/usr/bin # VCAST_SRC_BASE - Environment variable pointing to the source code base directory export VCAST_SRC_BASE=$SETUP_DIR/../firmware # This'll expand the relative path to absolute path # Comment out the following line if not used export VCAST_SRC_DIR="$( cd "$VCAST_SRC_BASE" >/dev/null && pwd )" # VCAST_PROJ_BASE - Environment variable pointing to the VectorCAST Project working directory export VCAST_PROJ_BASE=$SETUP_DIR export VCAST_PROJ_NAME=$(find "${VCAST_PROJ_BASE}" -type f -name "*.vcm" -exec sh -c 'printf "%s\n" "${0%.*}" | sed "s|^${VCAST_PROJ_BASE}/||"' {} ';') # --- Alternative: Set name directly --- # export VCAST_PROJ_NAME= # -------------------------------------- # VCAST_QA_PROJ_BASE - Location of VectorCAST Coverage environment files (.vcp, .enc, and .csh) export VCAST_QA_PROJ_BASE=$SETUP_DIR/vcast_qa export VCAST_QA_PROJ_NAME=$(find "${VCAST_QA_PROJ_BASE}" -type f -name "*.csh" -exec sh -c 'printf "%s\n" "${0%.*}" | sed "s|^${VCAST_QA_PROJ_BASE}/||"' {} ';') # --- Alternative: Set name directly --- # export VCAST_QA_PROJ_NAME= # -------------------------------------- # VCAST_SUPPORT_FILES - Environment variable pointing to the directory fo the support files used by VectorCAST export VCAST_SUPPORT_FILES=$SETUP_DIR/SupportFiles # (Optional) Python interpreter setup # export PYTHON_BIN_DIR=$VECTORCAST_DIR # export PYTHON_BIN=vpython export VCAST_CCS_INSTALL_DIR=~/ti/ccs910/ccs/ export PATH=$VCAST_CCS_INSTALL_DIR/tools/compiler/ti-cgt-arm_18.12.2.LTS/bin:$PATH # PATH - Update the PATH environment variable export PATH=$VECTORCAST_DIR:$PATH