]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - scripts/build_ccs_projects.bat
Added DTSX and PARMA build script.
[processor-sdk/performance-audio-sr.git] / scripts / build_ccs_projects.bat
1 @echo off
2 :: *************************************************************************
3 ::  FILE           : build_ccs_projects.bat
4 ::  DESCRIPTION    :
5 ::
6 ::     Builds DSP PDK platform library.
7 ::     Builds ARM/DSP applications.
8 ::     Assumes setup_env.bat has been called.
9 ::
10 :: *************************************************************************
12 :: %1: Build profile: Debug, Release, SDF
13 :: %2: DH-IP package source directory
14 @echo Executing:  %~fn0 %1 %2
16 if "%PASDK_ROOT_DIR%" == "" set PASDK_ROOT_DIR=%~dp0..\
18 :: Set PASDK local root directory
19 set PASDK_LROOT_DIR=%PASDK_ROOT_DIR%pasdk
20 :: Set custom Processor SDK local root directory
21 set PSDK_CUST_LROOT_DIR=%PASDK_ROOT_DIR%psdk_cust
23 :: Set custom PDK install directory
24 set PDK_VERSION=1_0_1_2_eng
25 set PDK_INSTALL_DIR=%PSDK_CUST_LROOT_DIR%\pdk_k2g_%PDK_VERSION%
27 :: Set workspace directory
28 set CCS_WRKSP_DIR=workspace_v6_1
30 :: Work-around for bug with generated linker command file being read-only
31 set SAVE_CYGWIN=%CYGWIN%
32 set CYGWIN=nontsec
34 if "%1"=="Debug" goto SetBuildProfilesDebug
35 if "%1"=="Release" goto SetBuildProfilesRelease
37 :: Set build profiles for SDF
38 set PDK_PLATFORM_LIB_BUILD_PROFILE=Debug
39 set ARM_APP_BUILD_PROFILE=Debug_pkgs
40 set DSP_APP_BUILD_PROFILE=Debug_pkgs
41 goto cont1
43 :SetBuildProfilesDebug
44 :: Set build profiles for debug
45 set PDK_PLATFORM_LIB_BUILD_PROFILE=Debug
46 set ARM_APP_BUILD_PROFILE=Debug
47 set DSP_APP_BUILD_PROFILE=Debug
48 goto cont1
50 :SetBuildProfilesRelease
51 :: Set build profiles for release
52 :: FL: currently we only have a "Release" profile for the DSP
53 set PDK_PLATFORM_LIB_BUILD_PROFILE=Debug
54 set ARM_APP_BUILD_PROFILE=Debug
55 set DSP_APP_BUILD_PROFILE=Release
58 :cont1
59 if "%1" NEQ "SDF" goto build_ccs_projects
60 :: Set unzip path
61 for %%i in (git.exe) do set GIT_PATH=%DRIVE%%%~sp$PATH:i
62 set UNZIP_PATH=%GIT_PATH%..\usr\bin
63 set GIT_PATH=
65 :: Set Dolby IP local root directory
66 set DOLBY_IP_LROOT=%PASDK_ROOT_DIR%dolby_ip
67 :: Set package install directories (location generated packages unziped for ARM/DSP application build)
68 set BMDA_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
69 set CAR_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
70 set OAR_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
71 set DDP_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
72 set MATTHD_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
73 set INTR_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
74 :: All packages install to same directory
75 ::set DHIP_PKG_INSTALL_DIR=%DOLBY_IP_LROOT%\dh-ip
77 :: Set package directory (location of generated packages)
78 ::set DHIP_PKG_DIR=%DOLBY_IP_LROOT%\package
79 set DHIP_PKG_DIR=%2
81 :: Set package names
82 for /f "delims=" %%a in ('dir %DHIP_PKG_DIR%\*bmda* /b') do set BMDA_PKG_FNAME=%%a
83 for /f "delims=" %%a in ('dir %DHIP_PKG_DIR%\*car* /b') do set CAR_PKG_FNAME=%%a
84 for /f "delims=" %%a in ('dir %DHIP_PKG_DIR%\*oar* /b') do set OAR_PKG_FNAME=%%a
85 for /f "delims=" %%a in ('dir %DHIP_PKG_DIR%\*ddp* /b') do set DDP_PKG_FNAME=%%a
86 for /f "delims=" %%a in ('dir %DHIP_PKG_DIR%\*matthd* /b') do set MATTHD_PKG_FNAME=%%a
87 for /f "delims=" %%a in ('dir %DHIP_PKG_DIR%\*intrinsics* /b') do set INTR_PKG_FNAME=%%a
89 :: Install packages at application build locations
90 if exist %BMDA_PKG_INSTALL_DIR%\nul     ( rmdir /S / Q %BMDA_PKG_INSTALL_DIR% )
91 if exist %CAR_PKG_INSTALL_DIR%\nul      ( rmdir /S / Q %CAR_PKG_INSTALL_DIR% )
92 if exist %OAR_PKG_INSTALL_DIR%\nul      ( rmdir /S / Q %OAR_PKG_INSTALL_DIR% )
93 if exist %DDP_PKG_INSTALL_DIR%\nul      ( rmdir /S / Q %DDP_PKG_INSTALL_DIR% )
94 if exist %MATTHD_PKG_INSTALL_DIR%\nul   ( rmdir /S / Q %MATTHD_PKG_INSTALL_DIR% )
95 if exist %INTR_PKG_INSTALL_DIR%\nul     ( rmdir /S / Q %INTR_PKG_INSTALL_DIR% )
96 @%UNZIP_PATH%\unzip -o -d %BMDA_PKG_INSTALL_DIR% %DHIP_PKG_DIR%\%BMDA_PKG_FNAME%
97 @%UNZIP_PATH%\unzip -o -d %CAR_PKG_INSTALL_DIR% %DHIP_PKG_DIR%\%CAR_PKG_FNAME%
98 @%UNZIP_PATH%\unzip -o -d %OAR_PKG_INSTALL_DIR% %DHIP_PKG_DIR%\%OAR_PKG_FNAME%
99 @%UNZIP_PATH%\unzip -o -d %DDP_PKG_INSTALL_DIR% %DHIP_PKG_DIR%\%DDP_PKG_FNAME%
100 @%UNZIP_PATH%\unzip -o -d %MATTHD_PKG_INSTALL_DIR% %DHIP_PKG_DIR%\%MATTHD_PKG_FNAME%
101 @%UNZIP_PATH%\unzip -o -d %INTR_PKG_INSTALL_DIR% %DHIP_PKG_DIR%\%INTR_PKG_FNAME%
102 :: All packages install to same directory
103 ::@%UNZIP_PATH%\unzip -o -d %DHIP_PKG_INSTALL_DIR% '%DHIP_PKG_DIR%\*.zip'
106 :build_ccs_projects
107 ::
108 :: Initialize RTSC tools discovery path
109 ::
110 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.initialize -rtsc.productDiscoveryPath %PSDK_CUST_LROOT_DIR%
111 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.initialize -rtsc.productDiscoveryPath %PSDK_CUST_LROOT_DIR%
112 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.initialize -rtsc.productDiscoveryPath %PSDK_CUST_LROOT_DIR%
114 ::
115 :: Import projects into workspace
116 ::
118 :: Import PDK platform library project into workspace
119 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectImport -ccs.location "%PDK_INSTALL_DIR%\packages\ti\platform\evmk2g\platform_lib"
121 :: Import ARM and DSP application projects to workspace
122 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectImport -ccs.location "%PASDK_LROOT_DIR%\test_arm"
123 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectImport -ccs.location "%PASDK_LROOT_DIR%\test_dsp"
125 ::
126 :: Build projects
127 ::
129 :: Build PDK platform library project
130 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectBuild -ccs.projects platform_lib_evmk2g -ccs.configuration %PDK_PLATFORM_LIB_BUILD_PROFILE%
132 :: Build ARM application project
133 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectBuild -ccs.projects test_arm -ccs.configuration %ARM_APP_BUILD_PROFILE%
135 :: Build DSP application project
136 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectBuild -ccs.projects test_dsp -ccs.configuration %DSP_APP_BUILD_PROFILE%
139 :cleanupenv
140 set PASDK_LROOT_DIR=
141 set PSDK_CUST_LROOT_DIR=
142 set PDK_VERSION=
143 set PDK_INSTALL_DIR=
144 set CCS_WRKSP_DIR=
145 set SAVE_CYGWIN=
146 set CYGWIN=
147 set PDK_PLATFORM_LIB_BUILD_PROFILE=
148 set ARM_APP_BUILD_PROFILE=
149 set DSP_APP_BUILD_PROFILE=
150 set UNZIP_PATH=
151 set DOLBY_IP_LROOT=
152 set BMDA_PKG_INSTALL_DIR=
153 set CAR_PKG_INSTALL_DIR=
154 set OAR_PKG_INSTALL_DIR=
155 set DDP_PKG_INSTALL_DIR=
156 set MATTHD_PKG_INSTALL_DIR=
157 set INTR_PKG_INSTALL_DIR=
158 set DHIP_PKG_DIR=
159 set BMDA_PKG_FNAME=
160 set CAR_PKG_FNAME=
161 set OAR_PKG_FNAME=
162 set DDP_PKG_FNAME=
163 set MATTHD_PKG_FNAME=
164 set INTR_PKG_FNAME=
167 :end