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