]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - scripts/build_ccs_projects.bat
895338ad3825923735f1a047376ef6c5acaa7b0e
[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 @echo Executing:  %~fn0 %1
15 if "%PASDK_ROOT_DIR%" == "" set PASDK_ROOT_DIR=%~dp0..\
17 :: Set PASDK local root directory
18 set PASDK_LROOT_DIR=%PASDK_ROOT_DIR%pasdk
19 :: Set custom Processor SDK local root directory
20 set PSDK_CUST_LROOT_DIR=%PASDK_ROOT_DIR%psdk_cust
22 :: Set custom PDK install directory
23 ::set PDK_VERSION=1_0_1_2_eng
24 ::set PDK_INSTALL_DIR=%PSDK_CUST_LROOT_DIR%\pdk_k2g_%PDK_VERSION%
26 :: Set workspace directory
27 set CCS_WRKSP_DIR=workspace_v6_1
29 :: Work-around for bug with generated linker command file being read-only
30 set SAVE_CYGWIN=%CYGWIN%
31 set CYGWIN=nontsec
33 if "%1"=="Debug" goto SetBuildProfilesDebug
34 if "%1"=="Release" goto SetBuildProfilesRelease
36 :: Set build profiles for SDF
37 ::set PDK_PLATFORM_LIB_BUILD_PROFILE=Debug
38 set ARM_APP_BUILD_PROFILE=Debug_pkgs
39 set DSP_APP_BUILD_PROFILE=Debug_pkgs
40 goto build_ccs_projects
42 :SetBuildProfilesDebug
43 :: Set build profiles for debug
44 ::set PDK_PLATFORM_LIB_BUILD_PROFILE=Debug
45 set ARM_APP_BUILD_PROFILE=Debug
46 set DSP_APP_BUILD_PROFILE=Debug
47 goto build_ccs_projects
49 :SetBuildProfilesRelease
50 :: Set build profiles for release
51 :: FL: currently we only have a "Release" profile for the DSP
52 ::set PDK_PLATFORM_LIB_BUILD_PROFILE=Debug
53 set ARM_APP_BUILD_PROFILE=Debug
54 set DSP_APP_BUILD_PROFILE=Release
57 :build_ccs_projects
58 ::
59 :: Initialize RTSC tools discovery path
60 ::
61 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.initialize -rtsc.productDiscoveryPath %PSDK_CUST_LROOT_DIR%
62 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.initialize -rtsc.productDiscoveryPath %PSDK_CUST_LROOT_DIR%
63 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.initialize -rtsc.productDiscoveryPath %PSDK_CUST_LROOT_DIR%
65 ::
66 :: Import projects into workspace
67 ::
69 :: Import PDK platform library project into workspace
70 ::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"
72 :: Import ARM and DSP application projects to workspace
73 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectImport -ccs.location "%PASDK_LROOT_DIR%\test_arm"
74 eclipsec -noSplash -data %PASDK_LROOT_DIR%\%CCS_WRKSP_DIR% -application com.ti.ccstudio.apps.projectImport -ccs.location "%PASDK_LROOT_DIR%\test_dsp"
76 ::
77 :: Build projects
78 ::
80 :: Build PDK platform library project
81 ::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%
83 :: Build ARM application project
84 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%
86 :: Build DSP application project
87 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%
90 set CYGWIN=%SAVE_CYGWIN%
92 :cleanupenv
93 set PASDK_LROOT_DIR=
94 set PSDK_CUST_LROOT_DIR=
95 ::set PDK_VERSION=
96 ::set PDK_INSTALL_DIR=
97 set CCS_WRKSP_DIR=
98 set SAVE_CYGWIN=
99 ::set PDK_PLATFORM_LIB_BUILD_PROFILE=
100 set ARM_APP_BUILD_PROFILE=
101 set DSP_APP_BUILD_PROFILE=
104 :end