Merge pull request #3 in PROCESSOR-SDK/traceframework from CATREQ-2702 to master
[keystone-rtos/traceframework.git] / tfsetupenv.sh
1 #!/bin/sh
2 #******************************************************************************
3 #* FILE PURPOSE: Environment Setup for building SA LLD
4 #******************************************************************************
5 #* FILE NAME: setupenv.sh
6 #*
7 #* DESCRIPTION: 
8 #*  Configures and sets up the Build Environment for SA LLD
9 #*  Customers are expected to modify this file as per their build environment.
10 #*
11 #* Copyright (C) 2012, Texas Instruments, Inc.
12 #*****************************************************************************
14 # Update the install directory location from here
15 if [ ! -n "$XDC_INSTALL_PATH" ]; then
16   export XDC_INSTALL_PATH=/home/a0756924/ti/xdctools_3_25_00_48
17   echo setting XDC_INSTALL_PATH to user set path: $XDC_INSTALL_PATH
18 fi
20 # PATH for the XDC Plugin gen path
21 if [ ! -n "$XDCPLUGIN_INSTALL_DIR" ]; then
22   export XDCPLUGIN_INSTALL_DIR=../DEP_TOOLS/xdc_eclipse_plugin_gen/20091203  
23   echo setting XDCPLUGIN_INSTALL_DIR to user set path: $XDCPLUGIN_INSTALL_DIR
24 fi
26 # c66x Tool chain path
27 if [ ! -n "$C6X_GEN_INSTALL_PATH" ]; then
28   export C6X_GEN_INSTALL_PATH=$HOME/ti/TI_CGT_C6000_7.3.16
29   echo setting C6X_GEN_INSTALL_PATH to user set path: $C6X_GEN_INSTALL_PATH  
30 fi
31 export C66CODEGENTOOL=$C6X_GEN_INSTALL_PATH
32 export XDCCGROOT=$C6X_GEN_INSTALL_PATH
33 #REM ---------------------------------
34 #REM Enabling debug flags
35 #REM ---------------------------------
36 export EXTDBGFLAGS="-mn -g --optimize_with_debug"
38 # export cgxml install path
39 if [ ! -n "$CGXML_INSTALL_PATH" ]; then
40   export CGXML_INSTALL_PATH=$HOME/ti/cg_xml
41   echo setting CGXML_INSTALL_PATH to user set path: $CGXML_INSTALL_PATH  
42 fi
45 # export cgxml install path
46 if [ ! -n "$UIA_INSTALL_PATH" ]; then
47   export UIA_INSTALL_PATH=$HOME/ti/uia_1_01_04_27
48   echo setting UIA_INSTALL_PATH to user set path: $UIA_INSTALL_PATH  
49 fi
51 # ARM Cortex-A8 Tool chain path
52 if [ ! -n "$CROSS_TOOL_INSTALL_PATH" ]; then
53   export CROSS_TOOL_INSTALL_PATH=/opt/linaro-2013.03/bin
54   export CROSS_TOOL_PRFX=arm-linux-gnueabihf-
55   echo setting CROSS_TOOL_INSTALL_PATH to user set path: $CROSS_TOOL_INSTALL_PATH  
56 fi
57 export GCARMV7ACGTOOL=$CROSS_TOOL_INSTALL_PATH
58 export GCARMV7ALONGNAME=$CROSS_TOOL_PRFX
60 # Set path to root folder of CSL (i.e packages directory of the PDK)
61 if [ ! -n "$PDK_INSTALL_PATH" ]; then
62   export PDK_INSTALL_PATH=$HOME/ti/pdk_tci6614_1_01_00_01/packages
63   echo setting PDK_INSTALL_PATH to user set path: $PDK_INSTALL_PATH  
64 fi
66 # Verify setup paths (Please do not change anything from here 
67 export DIR_NOT_EXIST=
68 if ! [ -d "$XDC_INSTALL_PATH" ]; then
69 export DIR_NOT_EXIST=FALSE
70 echo XDC_INSTALL_PATH:$XDC_INSTALL_PATH does not exist!!!
71 fi
73 if ! [ -d "$C6X_GEN_INSTALL_PATH" ]; then
74 export DIR_NOT_EXIST=FALSE
75 echo C6X_GEN_INSTALL_PATH:$C6X_GEN_INSTALL_PATH does not exist!!!
76 fi
78 if ! [ -d "$UIA_INSTALL_PATH" ]; then
79 export DIR_NOT_EXIST=FALSE
80 echo UIA_INSTALL_PATH:$UIA_INSTALL_PATH does not exist!!!
81 fi
84 if ! [ -d "$CROSS_TOOL_INSTALL_PATH" ]; then
85 export DIR_NOT_EXIST=FALSE
86 echo CROSS_TOOL_INSTALL_PATH:$CROSS_TOOL_INSTALL_PATH does not exist!!!
87 fi
89 if ! [ -d "$PDK_INSTALL_PATH" ]; then
90 export DIR_NOT_EXIST=FALSE
91 echo PDK_INSTALL_PATH:$exitINSTALL_PATH does not exist !!!
92 fi
94 if ! [ -d "$CGXML_INSTALL_PATH" ]; then
95 export DIR_NOT_EXIST=FALSE
96 echo CGXML_INSTALL_PATH:$CGXML_INSTALL_PATH does not exist !!!
97 fi
99 if [ "$DIR_NOT_EXIST" == "" ];then
100         echo TRACEFRAMEWORK BUILD ENVIRONMENT SUCCESFULLY CONFIGURED
101   # Any other components you could add as
102   # XDCPATH=<your component>/packages;...
103   export XDCPATH="$C6X_GEN_INSTALL_PATH/include;$XDC_INSTALL_PATH/packages;$UIA_INSTALL_PATH/packages"
104   export PATH=$PATH:$XDC_INSTALL_PATH:$CROSS_TOOL_INSTALL_PATH:$CGXML_INSTALL_PATH/bin:$C6X_GEN_INSTALL_PATH/bin        
105 else
106   echo TRACEFRAMEWORK LLD BUILD ENVIRONMENT NOT CONFIGURED 
107 fi