Update UART LLD makefile to only build k2g c66x, little-endian
[processor-sdk/performance-audio-sr.git] / pdk_k2g_1_0_1 / packages / pdksetupenv.bat
1 @REM ******************************************************************************
2 @REM * FILE PURPOSE: Environment Setup for building PDK
3 @REM ******************************************************************************
4 @REM * FILE NAME: pdksetupenv.bat
5 @REM *
6 @REM * DESCRIPTION: 
7 @REM *  Configures and sets up the Build Environment for PDK.
8 @REM *
9 @REM *  The batch file expects an optional argument:PDK_INSTALL_PATH: Location
10 @REM *  of the PDK package.  If the argument is not specified the batch file
11 @REM *  assumes that the PDK is installed in the same location where the batch
12 @REM *  file is located and is being executed.
13 @REM *
14 @REM * USAGE:
15 @REM *  pdksetupenv.bat "C:\ti\pdk_<device>_<version>\packages"
16 @REM *   --- OR ---
17 @REM *  pdksetupenv.bat
18 @REM *
19 @REM * Copyright (C) 2012-2016, Texas Instruments, Inc.
20 @REM *****************************************************************************
21 @echo off
22 @REM *******************************************************************************
23 @REM ********************** GET PARAMETERS PASSED THROUGH ARGUMENT   ***************
24 @REM *******************************************************************************
25 @REM Parameter Validation: Check if the argument was passed to the batch file and
26 @REM if so we use that else we default to the working directory where the batch 
27 @REM file was invoked from
29 set tempVar=%1
30 if defined tempVar (
31     set PDK_INSTALL_PATH=%~fs1
32 ) else (
33     set PDK_INSTALL_PATH=%~sdp0
34 )
36 set PDK_INSTALL_PATH=%PDK_INSTALL_PATH:\=/%
38 @rem PDK_INSTALL_PATH workaround for compilation of board library.
39 @rem A drive letter in PDK_INSTALL_PATH will cause make of board library to fail because
40 @rem make mis-interprets drive letters as rules.  Thus remove the drive letter which
41 @rem means the 'make' or 'xdc' shall run from same drive letter as PDK when building PDK
42 @rem or SDK components.
43 set PDK_INSTALL_PATH=%PDK_INSTALL_PATH:~2%
45 if not defined SDK_INSTALL_PATH (
46     set SDK_INSTALL_PATH=C:/ti
47 )
49 @REM *******************************************************************************
50 @REM ********************** CHECK REQUIRED ENVIRONMENT DEFINES BEGIN ***************
51 @REM *******************************************************************************
53 @REM Version of CG-Tools
54 set CGT_VERSION=8.1.0
56 @REM Cross compiler prefix
57 set GCC_CROSS_TOOL_PREFIX=arm-none-eabi-
59 @REM Version of GCC for ARM A15
60 set GCC_VERSION_ARM_A15=%GCC_CROSS_TOOL_PREFIX%4_8-2014q3
62 @REM Version of GCC for ARM A8
63 set GCC_VERSION_ARM_A8=%GCC_CROSS_TOOL_PREFIX%4_8-2014q3
65 @REM Version of GCC for ARM A9
66 set GCC_VERSION_ARM_A9=%GCC_CROSS_TOOL_PREFIX%4_8-2014q3
68 @REM Version of CG-ARM-Tools for M4
69 set CGT_M4_VERSION=5.2.5
71 @REM Version of FPULIB for ARM
72 set GCC_VERSION_FPULIB=4.8.4
74 @REM Version of XDC
75 set XDC_VERSION=3_32_00_06_core
77 @REM Version of BIOS
78 set BIOS_VERSION=6_45_01_29
80 @REM Version of IPC
81 set IPC_VERSION=3_42_00_02
83 @REM EDMA3 Version
84 set EDMA_VERSION=2_12_01_23
86 @REM Version of the NDK
87 set NDK_VERSION=2_24_03_35
89 @REM Version of the IMGLIB
90 set IMGLIB_VERSION=c66x_3_1_1_0
92 @REM Version of the UIA
93 set UIA_VERSION=2_00_03_43
95 if not defined C6X_GEN_INSTALL_PATH (
96     set C6X_GEN_INSTALL_PATH=%SDK_INSTALL_PATH%/ccsv6/tools/compiler/ti-cgt-c6000_%CGT_VERSION%
97 )
98 set C6X_GEN_INSTALL_PATH=%C6X_GEN_INSTALL_PATH:\=/%
100 if not defined TOOLCHAIN_PATH_A15 (
101     set TOOLCHAIN_PATH_A15=%SDK_INSTALL_PATH%/ccsv6/tools/compiler/gcc-%GCC_VERSION_ARM_A15%
103 set TOOLCHAIN_PATH_A15=%TOOLCHAIN_PATH_A15:\=/%
105 if not defined TOOLCHAIN_PATH_A8 (
106     set TOOLCHAIN_PATH_A8=%SDK_INSTALL_PATH%/ccsv6/tools/compiler/gcc-%GCC_VERSION_ARM_A8%
108 set TOOLCHAIN_PATH_A8=%TOOLCHAIN_PATH_A8:\=/%
110 if not defined TOOLCHAIN_PATH_A9 (
111     set TOOLCHAIN_PATH_A9=%SDK_INSTALL_PATH%/ccsv6/tools/compiler/gcc-%GCC_VERSION_ARM_A9%
113 set TOOLCHAIN_PATH_A9=%TOOLCHAIN_PATH_A9:\=/%
115 if not defined TOOLCHAIN_PATH_M4 (
116     set TOOLCHAIN_PATH_M4=%SDK_INSTALL_PATH%/ccsv6/tools/compiler/ti-cgt-arm_%CGT_M4_VERSION%
118 set TOOLCHAIN_PATH_M4=%TOOLCHAIN_PATH_M4:\=/%
120 if not defined FPULIB_PATH (
121     set FPULIB_PATH=%TOOLCHAIN_PATH_A9%/lib/gcc/arm-none-eabi/%GCC_VERSION_FPULIB%/fpu
123 set FPULIB_PATH=%FPULIB_PATH:\=/%
125 if not defined CROSS_TOOL_PRFX (
126     set CROSS_TOOL_PRFX=%GCC_CROSS_TOOL_PREFIX%
128 set CROSS_TOOL_PRFX=%CROSS_TOOL_PRFX:\=/%
130 if not defined XDC_INSTALL_PATH (
131     set XDC_INSTALL_PATH=%SDK_INSTALL_PATH%/xdctools_%XDC_VERSION%
133 set XDC_INSTALL_PATH=%XDC_INSTALL_PATH:\=/%
135 if not defined BIOS_INSTALL_PATH (
136     set BIOS_INSTALL_PATH=%SDK_INSTALL_PATH%/bios_%BIOS_VERSION%
138 set BIOS_INSTALL_PATH=%BIOS_INSTALL_PATH:\=/%
140 if not defined IPC_INSTALL_PATH (
141     set IPC_INSTALL_PATH=%SDK_INSTALL_PATH%/ipc_%IPC_VERSION%
143 set IPC_INSTALL_PATH=%IPC_INSTALL_PATH:\=/%
145 if not defined EDMA3LLD_BIOS6_INSTALLDIR (
146     set EDMA3LLD_BIOS6_INSTALLDIR=%SDK_INSTALL_PATH%/edma3_lld_%EDMA_VERSION%
148 set EDMA3LLD_BIOS6_INSTALLDIR=%EDMA3LLD_BIOS6_INSTALLDIR:\=/%
150 if not defined NDK_INSTALL_PATH (
151     set NDK_INSTALL_PATH=%SDK_INSTALL_PATH%/ndk_%NDK_VERSION%
153 set NDK_INSTALL_PATH=%NDK_INSTALL_PATH:\=/%
155 if not defined IMGLIB_INSTALL_PATH (
156     set IMGLIB_INSTALL_PATH=%SDK_INSTALL_PATH%/imglib_%IMGLIB_VERSION%
158 set IMGLIB_INSTALL_PATH=%IMGLIB_INSTALL_PATH:\=/%
160 if not defined UIA_INSTALL_PATH (
161     set UIA_INSTALL_PATH=%SDK_INSTALL_PATH%/uia_%UIA_VERSION%
163 set UIA_INSTALL_PATH=%UIA_INSTALL_PATH:\=/%
165 if not defined CG_XML_BIN_INSTALL_PATH (
166     @echo Optional parameter not configured : CG_XML_BIN_INSTALL_PATH
167     @echo REQUIRED for xdc release build
168     @echo Example: set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
171 if not defined DOXYGEN_INSTALL_PATH (
172     @echo Optional parameter not configured : DOXYGEN_INSTALL_PATH
173     @echo REQUIRED for xdc release build
174     @echo Example: set DOXYGEN_INSTALL_PATH=C:/ti/Doxygen/doxygen/1.5.1-p1/bin
177 @REM *******************************************************************************
178 @REM ********************** CHECK REQUIRED ENVIRONMENT DEFINES END ***************
179 @REM *******************************************************************************
181 @REM *******************************************************************************
182 @REM *************************** OPTIONAL ENVIRONMENT DEFINES **********************
183 @REM *************************** NOT REQUIRED FOR BUILDING THE PDK *****************
184 @REM *******************************************************************************
185 @REM STATIC_ANALYZE_PATH: Environment Variable for tool to do STATIC Analysis 
186 @REM                      of the code
187 @REM 
188 @REM DOXYGEN_INSTALL_PATH: DOXYGEN Version 1.7.3 [Only needed for generating Doxygen]
189 @REM 
190 @REM HTML_HELP_WORKSHOP_INSTALL_PATH: HTML Help compiler.[Only needed for generating Doxygen]
191 @REM 
192 @REM PDSP_CGEN_INSTALL_PATH: PDSP CGEN TOOLS [Only needed for PA firmware]
193 @REM *******************************************************************************
194 @REM *******************************************************************************
195 @REM *******************************************************************************
197 @REM PDK PARTNO
198 if not defined PARTNO set PARTNO=AM
199 if not defined SOC_FAMILY set SOC_FAMILY=AM
201 @REM Platforms supported by the PDK
202 if not defined SUPPORTED_PLATFORMS set SUPPORTED_PLATFORMS="k2g"
204 set CGTOOLS=%C6X_GEN_INSTALL_PATH%
206 @REM *******************************************************************************
207 @REM ** Convert paths to short name and to UNIX STYLE PATH for XDC build **
208 @REM *******************************************************************************
209 set PATH=%PATH%;%XDC_INSTALL_PATH%\packages\xdc\services\io\release
211 @REM *******************************************************************************
212 @REM This file requires path2dos.exe utility available from XDC tools. If path2dos.exe
213 @REM is not available in the build environment then short names for paths SHOULD be
214 @REM provided to environment variables e.g. C:\PROGRA~1\TEXASI~1\PDK_TC~4\packages.
215 @REM In Windows environment, "dir /x" and "dir /-n" displays the short names generated
216 @REM for non-8dot3 file and directory names.
217 @REM *******************************************************************************
219 @REM for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%PDK_INSTALL_PATH%"') do set PDK_INSTALL_PATH=%%a
220 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%C6X_GEN_INSTALL_PATH%"') do set C6X_GEN_INSTALL_PATH=%%a
221 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%TOOLCHAIN_PATH_A15%"') do set TOOLCHAIN_PATH_A15=%%a
222 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%TOOLCHAIN_PATH_A8%"') do set TOOLCHAIN_PATH_A8=%%a
223 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%TOOLCHAIN_PATH_A9%"') do set TOOLCHAIN_PATH_A9=%%a
224 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%TOOLCHAIN_PATH_M4%"') do set TOOLCHAIN_PATH_M4=%%a
225 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%FPULIB_PATH%"') do set FPULIB_PATH=%%a
226 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%XDC_INSTALL_PATH%"') do set XDC_INSTALL_PATH=%%a
227 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%BIOS_INSTALL_PATH%"') do set BIOS_INSTALL_PATH=%%a
228 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%IPC_INSTALL_PATH%"') do set IPC_INSTALL_PATH=%%a
229 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%EDMA3LLD_BIOS6_INSTALLDIR%"') do set EDMA3LLD_BIOS6_INSTALLDIR=%%a
230 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%NDK_INSTALL_PATH%"') do set NDK_INSTALL_PATH=%%a
231 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%IMGLIB_INSTALL_PATH%"') do set IMGLIB_INSTALL_PATH=%%a
232 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%UIA_INSTALL_PATH%"') do set UIA_INSTALL_PATH=%%a
233 if defined CG_XML_BIN_INSTALL_PATH (
234     for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos "%CG_XML_BIN_INSTALL_PATH%"') do set CG_XML_BIN_INSTALL_PATH=%%a
237 set XDCCGROOT=%C6X_GEN_INSTALL_PATH%
239 echo **************************************************************************
240 echo Environment Configuration:
241 echo     SUPPORTED_PLATFORMS       : %SUPPORTED_PLATFORMS%
242 echo     PDK_INSTALL_PATH          : %PDK_INSTALL_PATH%
243 echo     C6X_GEN_INSTALL_PATH      : %C6X_GEN_INSTALL_PATH%
244 echo     TOOLCHAIN_PATH_A15        : %TOOLCHAIN_PATH_A15%
245 echo     TOOLCHAIN_PATH_A8         : %TOOLCHAIN_PATH_A8%
246 echo     TOOLCHAIN_PATH_A9         : %TOOLCHAIN_PATH_A9%
247 echo     TOOLCHAIN_PATH_M4         : %TOOLCHAIN_PATH_M4%
248 echo     FPULIB_PATH               : %FPULIB_PATH%
249 echo     CROSS_TOOL_PRFX           : %CROSS_TOOL_PRFX%
250 echo     XDC_INSTALL_PATH          : %XDC_INSTALL_PATH%
251 echo     BIOS_INSTALL_PATH         : %BIOS_INSTALL_PATH%
252 echo     IPC_INSTALL_PATH          : %IPC_INSTALL_PATH%
253 echo     EDMA3LLD_BIOS6_INSTALLDIR : %EDMA3LLD_BIOS6_INSTALLDIR%
254 echo     NDK_INSTALL_PATH          : %NDK_INSTALL_PATH%
255 echo     IMGLIB_INSTALL_PATH       : %IMGLIB_INSTALL_PATH%
256 echo     UIA_INSTALL_PATH          : %UIA_INSTALL_PATH%
257 if defined CG_XML_BIN_INSTALL_PATH (
258     echo     CG_XML_BIN_INSTALL_PATH   : %CG_XML_BIN_INSTALL_PATH%
261 @echo off
262 @REM *******************************************************************************
263 @REM *************************** XDC PATH Configuration ****************************
264 @REM *******************************************************************************
266 @REM Ensure that all the components inside PDK are a part of the XDC Path; such
267 @REM that one component can use another.
268 set XDCPATH=../../..;%XDC_INSTALL_PATH%/packages;%PDK_INSTALL_PATH%/.
269 set XDCPATH=%XDCPATH%;%EDMA3LLD_BIOS6_INSTALLDIR%/packages;%BIOS_INSTALL_PATH%/packages;%IPC_INSTALL_PATH%/packages;%NDK_INSTALL_PATH%/packages;%UIA_INSTALL_PATH%/packages
271 @REM *******************************************************************************
272 @REM ************************** Build Tools Configuration **************************
273 @REM *******************************************************************************
275 @REM Windows Path
276 set PATH=C:/Windows/System32
278 @REM Compiler Tools:
279 set PATH=%PATH%;%C6X_GEN_INSTALL_PATH%/bin
281 @REM XDC Tools location:
282 set PATH=%PATH%;%XDC_INSTALL_PATH%;%XDC_INSTALL_PATH%\bin;%XDC_INSTALL_PATH%\packages\xdc\services\io\release
284 @REM CG-XML Package:
285 if defined CG_XML_BIN_INSTALL_PATH  set PATH=%PATH%;%CG_XML_BIN_INSTALL_PATH%
287 @REM Third Party Tools: Doxygen
288 if defined DOXYGEN_INSTALL_PATH  set PATH=%PATH%;%DOXYGEN_INSTALL_PATH%
290 @REM Third Party Tools: HTML Help compiler.
291 if defined HTML_HELP_WORKSHOP_INSTALL_PATH  set PATH=%PATH%;%HTML_HELP_WORKSHOP_INSTALL_PATH%;
293 @REM Third Party Tools: Coverity
294 if defined STATIC_ANALYZE_PATH  set PATH=%PATH%;%STATIC_ANALYZE_PATH%\bin
296 @REM Set the Title Window appropiately.
297 Title PDK Build Environment
299 if not defined PDK_PATH (
300     @REM SDK level makefile did not invoke PDK level makefile
302     @echo **************************************************************************
303     @echo Changing to short name to support directory names containing spaces
304     @echo current directory: %PDK_INSTALL_PATH%
306     cd %PDK_INSTALL_PATH%
307     @echo PDK BUILD ENVIRONMENT CONFIGURED
308     @echo **************************************************************************