Fix config.bld DDR3 size
[processor-sdk/performance-audio-sr.git] / pdk_k2g_1_0_1 / packages / pdksetupenv.sh
1 #!/bin/bash
2 # ******************************************************************************
3 # * FILE PURPOSE: Environment Setup for building PDK
4 # ******************************************************************************
5 # * FILE NAME: pdksetupenv.sh
6 # *
7 # * DESCRIPTION: 
8 # *  Configures and sets up the Build Environment for PDK. 
9 # *
10 # *  The batch file expects an optional argument:PDK_INSTALL_PATH: Location
11 # *  of the PDK package.  If the argument is not specified the batch file
12 # *  assumes that the PDK is installed in the same location where the batch
13 # *  file is located and is being executed.
14 # *
15 # * USAGE:
16 # *  ./pdksetupenv.sh ~/ti/pdk_<device>_<version>/packages
17 # *     --- OR ---
18 # *  ./pdksetupenv.sh
19 # *
20 # * Copyright (C) 2012-2016, Texas Instruments, Inc.
21 # *****************************************************************************
23 # *******************************************************************************
24 # ********************** GET PARAMETERS PASSED THROUGH ARGUMENT   ***************
25 # *******************************************************************************
26 # Parameter Validation: Check if the argument was passed to the batch file and
27 # if so we use that else we default to the working directory where the batch 
28 # file was invoked from
30 tempVar=$1
31 if [ ! -z $tempVar ];then
32     export PDK_INSTALL_PATH=$tempVar
33 else
34     export PDK_INSTALL_PATH=${PWD}
35 fi
37 # TI SDK root directory
38 if [ -z $SDK_INSTALL_PATH ]; then
39     export SDK_INSTALL_PATH=~/ti
40 fi
42 # Output directory for generated libraries
43 export LIBDIR=./lib
45 # *******************************************************************************
46 # ********************** CHECK REQUIRED ENVIRONMENT DEFINES BEGIN ***************
47 # *******************************************************************************
49 # Version of CG-Tools
50 CGT_VERSION=8.1.0
52 # Cross compiler prefix
53 GCC_CROSS_TOOL_PREFIX=arm-none-eabi-
55 # Version of GCC for ARM A15
56 GCC_VERSION_ARM_A15=${GCC_CROSS_TOOL_PREFIX}4_8-2014q3
58 # Version of GCC for ARM A8
59 GCC_VERSION_ARM_A8=${GCC_CROSS_TOOL_PREFIX}4_8-2014q3
61 # Version of GCC for ARM A9
62 GCC_VERSION_ARM_A9=${GCC_CROSS_TOOL_PREFIX}4_8-2014q3
64 # Version of CG-ARM-Tools for M4
65 CGT_M4_VERSION=5.2.5
67 # Version of FPULIB for ARM
68 GCC_VERSION_FPULIB=4.8.4
70 # Version of XDC
71 XDC_VERSION=3_32_00_06_core
73 # Version of BIOS
74 BIOS_VERSION=6_45_01_29
76 # Version of IPC
77 IPC_VERSION=3_42_00_02
79 # EDMA3 Version
80 EDMA_VERSION=2_12_01_23
82 # Version of the NDK
83 NDK_VERSION=2_24_03_35
85 # Version of the IMGLIB
86 IMGLIB_VERSION=c66x_3_1_1_0
88 # Version of the UIA
89 UIA_VERSION=2_00_03_43
91 if [ -z $C6X_GEN_INSTALL_PATH ]; then
92     export C6X_GEN_INSTALL_PATH="${SDK_INSTALL_PATH}/ccsv6/tools/compiler/ti-cgt-c6000_$CGT_VERSION"
93 fi
95 if [ -z $TOOLCHAIN_PATH_A15 ]; then
96     export TOOLCHAIN_PATH_A15="${SDK_INSTALL_PATH}/ccsv6/tools/compiler/gcc-$GCC_VERSION_ARM_A15"
97 fi
99 if [ -z $TOOLCHAIN_PATH_A8 ]; then
100     export TOOLCHAIN_PATH_A8="${SDK_INSTALL_PATH}/ccsv6/tools/compiler/gcc-$GCC_VERSION_ARM_A8"
101 fi
103 if [ -z $TOOLCHAIN_PATH_A9 ]; then
104     export TOOLCHAIN_PATH_A9="${SDK_INSTALL_PATH}/ccsv6/tools/compiler/gcc-$GCC_VERSION_ARM_A9"
105 fi
107 if [ -z $TOOLCHAIN_PATH_M4 ]; then
108     export TOOLCHAIN_PATH_M4="${SDK_INSTALL_PATH}/ccsv6/tools/compiler/ti-cgt-arm_$CGT_M4_VERSION"
109 fi
111 if [ -z $FPULIB_PATH ]; then
112     export FPULIB_PATH="$TOOLCHAIN_PATH_A9/lib/gcc/arm-none-eabi/$GCC_VERSION_FPULIB/fpu"
113 fi
115 if [ -z $CROSS_TOOL_PRFX ]; then
116     export CROSS_TOOL_PRFX="$GCC_CROSS_TOOL_PREFIX"
117 fi
119 if [ -z $XDC_INSTALL_PATH ]; then
120     export XDC_INSTALL_PATH="${SDK_INSTALL_PATH}/xdctools_$XDC_VERSION"
121 fi
123 if [ -z $BIOS_INSTALL_PATH ]; then
124     export BIOS_INSTALL_PATH="${SDK_INSTALL_PATH}/bios_$BIOS_VERSION"
125 fi
127 if [ -z $IPC_INSTALL_PATH ]; then
128     export IPC_INSTALL_PATH="${SDK_INSTALL_PATH}/ipc_$IPC_VERSION"
129 fi
131 if [ -z $EDMA3LLD_BIOS6_INSTALLDIR ]; then
132     export EDMA3LLD_BIOS6_INSTALLDIR="${SDK_INSTALL_PATH}/edma3_lld_$EDMA_VERSION"
133 fi
135 if [ -z $NDK_INSTALL_PATH ]; then
136     export NDK_INSTALL_PATH="${SDK_INSTALL_PATH}/ndk_$NDK_VERSION"
137 fi
139 if [ -z $IMGLIB_INSTALL_PATH ]; then
140     export IMGLIB_INSTALL_PATH="${SDK_INSTALL_PATH}/imglib_$IMGLIB_VERSION"
141 fi
143 if [ -z $UIA_INSTALL_PATH ]; then
144     export UIA_INSTALL_PATH="${SDK_INSTALL_PATH}/uia_$UIA_VERSION"
145 fi
147 if [ -z $CG_XML_BIN_INSTALL_PATH ]; then
148     echo "Optional parameter not configured : CG_XML_BIN_INSTALL_PATH"
149     echo "REQUIRED for xdc release build"
150     echo "Example: export CG_XML_BIN_INSTALL_PATH=\"~/ti/cg_xml/bin\""
151 fi
153 if [ -z $DOXYGEN_INSTALL_PATH ]; then
154     echo "Optional parameter not configured : DOXYGEN_INSTALL_PATH"
155     echo "REQUIRED for xdc release build"
156     echo "Example: export DOXYGEN_INSTALL_PATH=\"~/ti/Doxygen/doxygen/1.5.1-p1/bin\""
157 fi
159 # *******************************************************************************
160 # ********************** CHECK REQUIRED ENVIRONMENT DEFINES END ***************
161 # *******************************************************************************
164 # *******************************************************************************
165 # *************************** OPTIONAL ENVIRONMENT DEFINES **********************
166 # *************************** NOT REQUIRED FOR BUILDING THE PDK *****************
167 # *******************************************************************************
168 # STATIC_ANALYZE_PATH: Environment Variable for tool to do STATIC Analysis 
169 #                      of the code
170
171 # DOXYGEN_INSTALL_PATH: DOXYGEN Version 1.7.3 [Only needed for generating Doxygen]
172
173 # HTML_HELP_WORKSHOP_INSTALL_PATH: HTML Help compiler.[Only needed for generating Doxygen]
174
175 # PDSP_CGEN_INSTALL_PATH: PDSP CGEN TOOLS [Only needed for PA firmware]
176 # *******************************************************************************
177 # *******************************************************************************
178 # *******************************************************************************
180 # Keystone 2 AIF2 LLD 
181 export SOC_FAMILY=KeyStone2
182 # PDK PARTNO
183 export PARTNO=am57xx
184 # Platforms supported by the PDK
185 export SUPPORTED_PLATFORMS="k2g"
187 export CGTOOLS=$C6X_GEN_INSTALL_PATH
189 # *******************************************************************************
190 # ** Convert C6X_GEN_INSTALL_PATH and PDK_INSTALL_PATH to short name and to UNIX STYLE PATH  for XDC build **
191 # *******************************************************************************
192 export PATH=$PATH:$XDC_INSTALL_PATH/packages/xdc/services/io/release
194 export XDCCGROOT=$C6X_GEN_INSTALL_PATH
196 echo "**************************************************************************"
197 echo "Environment Configuration:"
198 echo "    SUPPORTED_PLATFORMS       : $SUPPORTED_PLATFORMS"
199 echo "    PDK_INSTALL_PATH          : $PDK_INSTALL_PATH"
200 echo "    C6X_GEN_INSTALL_PATH      : $C6X_GEN_INSTALL_PATH"
201 echo "    TOOLCHAIN_PATH_A15        : $TOOLCHAIN_PATH_A15"
202 echo "    TOOLCHAIN_PATH_A8         : $TOOLCHAIN_PATH_A8"
203 echo "    TOOLCHAIN_PATH_A9         : $TOOLCHAIN_PATH_A9"
204 echo "    TOOLCHAIN_PATH_M4         : $TOOLCHAIN_PATH_M4"
205 echo "    FPULIB_PATH               : $FPULIB_PATH"
206 echo "    CROSS_TOOL_PRFX           : $CROSS_TOOL_PRFX"
207 echo "    XDC_INSTALL_PATH          : $XDC_INSTALL_PATH"
208 echo "    BIOS_INSTALL_PATH         : $BIOS_INSTALL_PATH"
209 echo "    IPC_INSTALL_PATH          : $IPC_INSTALL_PATH"
210 echo "    EDMA3LLD_BIOS6_INSTALLDIR : $EDMA3LLD_BIOS6_INSTALLDIR"
211 echo "    NDK_INSTALL_PATH          : $NDK_INSTALL_PATH"
212 echo "    IMGLIB_INSTALL_PATH       : $IMGLIB_INSTALL_PATH"
213 echo "    UIA_INSTALL_PATH          : $UIA_INSTALL_PATH"
214 if [ ! -z $CG_XML_BIN_INSTALL_PATH ]; then
215     echo "    CG_XML_BIN_INSTALL_PATH   : $CG_XML_BIN_INSTALL_PATH"
216 fi
218 # *******************************************************************************
219 # *************************** XDC PATH Configuration ****************************
220 # *******************************************************************************
222 # Ensure that all the components inside PDK are a part of the XDC Path; such that
223 # one component can use another.
224 export XDCPATH="../../..;$XDC_INSTALL_PATH/packages;$PDK_INSTALL_PATH"
225 export XDCPATH="$XDCPATH;$EDMA3LLD_BIOS6_INSTALLDIR/packages;$BIOS_INSTALL_PATH/packages;$IPC_INSTALL_PATH/packages;$NDK_INSTALL_PATH/packages;$UIA_INSTALL_PATH/packages"
227 # *******************************************************************************
228 # ************************** Build Tools Configuration **************************
229 # *******************************************************************************
231 # Compiler Tools:
232 export PATH=$PATH:$C6X_GEN_INSTALL_PATH/bin
234 # XDC Tools location:
235 export PATH=$PATH:$XDC_INSTALL_PATH:$XDC_INSTALL_PATH\bin
237 # CG-XML Package:
238 if [ ! -z $CG_XML_BIN_INSTALL_PATH ]; then
239     export PATH=$PATH:$CG_XML_BIN_INSTALL_PATH
240 fi
242 # Third Party Tools: Doxygen
243 if [ ! -z $DOXYGEN_INSTALL_PATH ]; then
244     export PATH=$PATH:$DOXYGEN_INSTALL_PATH
245 fi
247 # Third Party Tools: HTML Help compiler.
248 if [ ! -z $HTML_HELP_WORKSHOP_INSTALL_PATH ]; then
249     export PATH=$PATH:$HTML_HELP_WORKSHOP_INSTALL_PATH
250 fi
252 # Third Party Tools: Install-Jammer (Not required by customers)
253 if [ ! -z $INSTALL_JAMMER_DIR ]; then
254     export PATH=$PATH:$INSTALL_JAMMER_DIR
255 fi
257 # Third Party Tools: Coverity
258 if [ ! -z $STATIC_ANALYZE_PATH ]; then
259     export PATH=$PATH:$STATIC_ANALYZE_PATH/bin
260 fi
262 if [ -z $PDK_PATH ]; then
263     # SDK level makefile did not invoke PDK level makefile
265     echo "PDK BUILD ENVIRONMENT CONFIGURED"
266     echo "*******************************************************************************"
267 fi