cf76ae49f3f4533b8f44f30c2fd648e9f69c43d2
1 @echo off
3 :: *************************************************************************
4 :: FILE : build_all.bat
5 :: DESCRIPTION :
6 ::
7 :: Builds all for Dolby Harmony or DTS:X project for DA10x. This includes:
8 :: (1) DSP PDK LLD libraries: UART, SPI, I2C
9 :: (2) ARM/DSP PAF libraries
10 :: (3) ARM/DSP algorithm components libraries, either of:
11 :: - Dolby Harmony component libraries: BMDA, CAR, DDP, MAT-THD, OAR
12 :: - DTS:X component libraries: DTS:X Decoder, PARMA
13 :: (4) DSP PDK platform library
14 :: (5) ARM/DSP applications
15 :: Creates .zip packages for Dolby Harmony component libraries.
16 ::
17 :: *************************************************************************
19 @echo Executing: %~fn0 %1 %2 %3
21 :: *************************************************************************
22 :: *** Check command line input
23 :: *************************************************************************
24 if "%1"=="" goto use_err1
25 if "%2"=="" goto use_err1
26 if "%3"=="" goto use_err1
27 goto cont1
30 :use_err1
31 :: USAGE ERROR
32 echo ERROR: Supplied options are invalid.
33 echo .
34 echo . Usage: %0 ^<buildType^> SuperRepo ^<buildProfile^>
35 echo . -OR-
36 echo . Usage: %0 ^<buildType^> ^<buildTag^> ^<buildProfile^>
37 echo .
38 echo . buildType : ALL, DH, or DTSX
39 echo . SuperRepo : Use Git super-repository to track submodules for build targets
40 echo . buildTag : Use Git tag to track submodules for build targets
41 echo . buildProfile : Debug, Release, or SDF
42 echo .
43 goto end
46 :cont1
47 :: Set PASDK root directory
48 set PASDK_ROOT_DIR=%~dp0
49 if "%PASDK_ROOT_DIR:~-1%"=="\" set PASDK_ROOT_DIR=%PASDK_ROOT_DIR:~0,-1%
51 if "%3" NEQ "SDF" goto install_tools
52 :: Set PASDK target and version
53 set PASDK_TARGET_PLATFORM=k2g
54 set PASDK_VERSION=01_00_00_05
55 :: Set FD package version
56 set FD_PKG_VERSION=01_00_00_05
58 :: Set release directory
59 set RELEASE_DIR=%PASDK_ROOT_DIR%\release
60 :: Set FD package directory
61 set FD_PKG_DIR=%RELEASE_DIR%\fd_package
62 :: Set OS package directory
63 set OS_PKG_DIR=%RELEASE_DIR%\os_package
65 :: Set DH-IP package directory
66 set DHIP_PKG_DIR=%RELEASE_DIR%\dhip_package
67 :: Set DTSX-IP package directory
68 set DTSXIP_PKG_DIR=%RELEASE_DIR%\dtsxip_package
70 if exist %RELEASE_DIR%\nul ( rmdir /S / Q %RELEASE_DIR% )
73 :install_tools
74 :: *************************************************************************
75 :: *** Install tools
76 :: *************************************************************************
77 :: FL: tool installation not yet supported
78 ::@call scripts\install_tools.bat
79 @call scripts\setup_env.bat
81 :: *************************************************************************
82 :: *** Install code
83 :: *************************************************************************
84 @call scripts\install_code.bat %2
86 :: *************************************************************************
87 :: *** Build
88 :: *************************************************************************
89 :: Build DSP PDK LLD libraries
90 rem @pushd scripts
91 rem @cmd /c build_pdk_libs.bat
92 rem @popd
94 :: Build ARM/DSP PAF libraries
95 @pushd scripts
96 @call build_paf_libs.bat
97 @popd
99 :: Build ARM/DSP component libraries
100 :build_dh_libs
101 set TRUE=
102 if "%1"=="ALL" set TRUE=1
103 if "%1"=="DH" set TRUE=1
104 if defined TRUE (
105 rem Build Dolby Harmony component libraries
106 @pushd scripts
107 @call build_dh_libs.bat
108 @popd
110 if "%3"=="SDF" (
111 rem Build DH-IP packages
112 @pushd scripts
113 @call build_dhip_pkgs %DHIP_PKG_DIR%
114 @popd
116 rem Install DH-IP packages
117 @pushd scripts
118 @call install_dhip_pkgs %DHIP_PKG_DIR%
119 @popd
120 )
121 )
123 :build_dtsx_libs
124 set TRUE=
125 if "%1"=="ALL" set TRUE=1
126 if "%1"=="DTSX" set TRUE=1
127 if defined TRUE (
128 rem Build DTS:X component libraries
129 @pushd scripts
130 @call build_dtsx_libs.bat
131 @call build_parma_libs.bat
132 @popd
134 if "%3"=="SDF" (
135 rem Build DTSX-IP packages
136 @pushd scripts
137 @call build_dtsxip_pkgs %DTSXIP_PKG_DIR%
138 @popd
140 rem Install DH-IP packages
141 @pushd scripts
142 @call install_dtsxip_pkgs %DTSXIP_PKG_DIR%
143 @popd
144 )
145 )
147 :build_ccs_projects
148 :: Build CCS projects
149 @pushd scripts
150 @call build_ccs_projects.bat %1 %3
151 @popd
153 if "%3" NEQ "SDF" goto cleanupenv
154 :: Build FD package
155 @pushd scripts
156 @call build_fd_pkg.bat %FD_PKG_DIR%
157 @popd
159 :: Build OS package
160 @pushd scripts
161 @call build_os_pkg.bat %OS_PKG_DIR%
162 @popd
165 :cleanupenv
166 set PASDK_ROOT_DIR=
167 set PASDK_TARGET_PLATFORM=
168 set PASDK_VERSION=
169 set FD_PKG_VERSION=
170 set RELEASE_DIR=
171 set FD_PKG_DIR=
172 set OS_PKG_DIR=
173 set DHIP_PKG_DIR=
174 set DTSXIP_PKG_DIR=
175 set TRUE=
177 :end