]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/tcp3d-lld.git/blob - projectCreate.bat
Merge branch 'releases/mcsdk_03.01.00.00'
[keystone-rtos/tcp3d-lld.git] / projectCreate.bat
1 @REM ******************************************************************************\r
2 @REM * FILE PURPOSE: Unit Test and Example Project Creator\r
3 @REM ******************************************************************************\r
4 @REM * FILE NAME: projectCreate.bat\r
5 @REM *\r
6 @REM * DESCRIPTION: \r
7 @REM *  The script file is used to create the test and example projects of TCP3D.\r
8 @REM *  These projects are available in the specified workspace.\r
9 @REM *\r
10 @REM * Syntax:\r
11 @REM *  projectCreate.bat [deviceName] [endian]\r
12 @REM *\r
13 @REM * Description:     (first option is default)\r
14 @REM *  deviceName  -   k2k / k2h / k2l\r
15 @REM *  endian      -   little / big\r
16 @REM *\r
17 @REM * Example:\r
18 @REM *  a) projectCreate.bat\r
19 @REM *              - Creates all module projects for k2h device for little endian\r
20 @REM *  b) projectCreate.bat k2h\r
21 @REM *              - Creates all module projects for k2h device for little endian\r
22 @REM *  c) projectCreate.bat k2k big\r
23 @REM *              - Creates all module projects for k2k device for big endian\r
24 @REM *\r
25 @REM * Copyright (C) 2012, Texas Instruments, Inc.\r
26 @REM *****************************************************************************\r
27 @echo OFF\r
28 \r
29 REM Parameter Validation: Check if the argument was passed to the batch file.\r
30 REM *****************************************************************************\r
31 REM Argument [deviceName] is used to set DEVICE_NAME variable.\r
32 REM Valid values are 'k2k', 'k2h', 'k2l'. Defaults to 'k2h'.\r
33 set tempVar1=%1\r
34 if not defined tempVar1 goto nodevice\r
35 set DEVICE_NAME=%tempVar1%\r
36 goto devicedone\r
37 :nodevice\r
38 set DEVICE_NAME=k2h\r
39 :devicedone\r
40 \r
41 REM Argument [endian] is used to set ENDIAN variable.\r
42 REM This is Endianess of the Projects being created.\r
43 REM Valid Values are 'little' and 'big'. Defaults to 'little'.\r
44 set tempVar2=%2\r
45 if not defined tempVar2 goto littleendian\r
46 if %tempVar2% == big (\r
47 set ENDIAN=big\r
48 goto endiandone\r
49\r
50 :littleendian\r
51 set ENDIAN=little\r
52 :endiandone\r
53 \r
54 REM This is specific module for which Projects are created.\r
55 set MODULE=tcp3d\r
56 \r
57 REM Batch file execution location\r
58 set WORKDIR_SHORT=%~sdp0\r
59 \r
60 REM *****************************************************************************\r
61 \r
62 echo =========================================================================\r
63 echo.   DEVICE_NAME     :   %DEVICE_NAME%\r
64 echo.   ENDIAN          :   %ENDIAN%\r
65 echo.   MODULE          :   %MODULE%\r
66 echo.   WORKDIR_SHORT   :   %WORKDIR_SHORT%\r
67 echo =========================================================================\r
68 \r
69 REM *****************************************************************************\r
70 REM * Version Information of the various tools etc required to build the test\r
71 REM * projects. Customers are free to modify these to meet their requirements.\r
72 REM *****************************************************************************\r
73 \r
74 REM This is to control the CCS version specific project create command\r
75 REM Set to 'no' when using CCSv5 or set to 'yes' when using CCSv4\r
76 set IS_CCS_VERSION_4=no\r
77 \r
78 REM Set to 'no' when using QT, EVM, VDB, or other hardware. Set to 'yes' only when using the simulator.\r
79 set IS_SIMULATOR_SUPPORT_NEEDED=yes\r
80 \r
81 REM Install Location for CCS\r
82 set CCS_INSTALL_PATH="C:\ti\ccsv5"\r
83 \r
84 REM Workspace where the projects will be created in "example" and "test" folders.\r
85 set MY_WORKSPACE=.\r
86 \r
87 REM macros.ini location\r
88 set MACROS_FILE=%WORKDIR_SHORT%test\macros.ini\r
89 \r
90 REM This is the format of the executable being created\r
91 REM Valid Values are 'ELF' and 'COFF'\r
92 set OUTPUT_FORMAT=ELF\r
93 \r
94 REM Version of CG-Tools\r
95 set CGT_VERSION=7.4.4\r
96 \r
97 REM Version of XDC\r
98 set XDC_VERSION=3.25.05.94\r
99 \r
100 REM Version of BIOS\r
101 set BIOS_VERSION=6.37.00.20\r
102 \r
103 REM Version of the IPC\r
104 set IPC_VERSION=3.22.00.04\r
105 \r
106 REM EDMA3 Version\r
107 set EDMA_VERSION=02.11.11.15\r
108 \r
109 REM Version of the PDK\r
110 set PDK_VERSION=3.01.00.01\r
111 \r
112 REM PDK Part Number & Platform name\r
113 if %DEVICE_NAME% == k2k (\r
114 set PDK_PARTNO=TCI6638\r
115 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6638K2K\r
116 ) else if  %DEVICE_NAME% == k2h (\r
117 set PDK_PARTNO=TCI6636\r
118 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6636K2H\r
119 ) else if  %DEVICE_NAME% == k2l (\r
120 set PDK_PARTNO=TCI6630\r
121 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6630K2L\r
122 REM Temporarily using simKepler \r
123 REM set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
124 ) else (\r
125 set PDK_PARTNO=TCI6634\r
126 set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
127 )\r
128 \r
129 REM RTSC Target \r
130 REM - Please ensure that you select this taking into account the\r
131 REM   OUTPUT_FORMAT and the RTSC_PLATFORM_NAME \r
132 if "%ENDIAN%" == "big" (\r
133 set RTSC_TARGET=ti.targets.elf.C66_big_endian\r
134 ) else ( \r
135 set RTSC_TARGET=ti.targets.elf.C66\r
136 )\r
137 \r
138 REM *****************************************************************************\r
139 REM *****************************************************************************\r
140 REM                 Please do NOT change anything below this\r
141 REM *****************************************************************************\r
142 REM *****************************************************************************\r
143 \r
144 REM Set auto create command by default for use with CCSv5\r
145 set AUTO_CREATE_COMMAND=eclipse\eclipsec -noSplash \r
146 \r
147 REM If is CCS version 4 then set auto create command for use with CCSv4\r
148 If .%IS_CCS_VERSION_4% == .yes set AUTO_CREATE_COMMAND=eclipse\jre\bin\java -jar %CCS_INSTALL_PATH%\eclipse\startup.jar\r
149 \r
150 REM Set project for Silicon or QT by default\r
151 set SIMULATOR_SUPPORT_DEFINE=\r
152 \r
153 REM If simulator support is needed then set the define\r
154 If .%IS_SIMULATOR_SUPPORT_NEEDED% == .yes set SIMULATOR_SUPPORT_DEFINE=-ccs.setCompilerOptions "--define SIMULATOR_SUPPORT"\r
155 \r
156 echo *****************************************************************************\r
157 echo Detecting UnitTest Projects in TCP3D and importing them in the workspace %MY_WORKSPACE%\r
158 \r
159 REM Search for all the test Project Files in the TCP3D.\r
160 for /F %%I IN ('dir /b /s *%DEVICE_NAME%*testproject.txt') do (\r
161 echo Detected Test Project: %%~nI\r
162 \r
163 REM Goto each directory where the test project file is located and create the projects.\r
164 pushd test\r
165 \r
166 REM Execute the command to create the project using the parameters specified above.\r
167 %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.name %%~nI_%ENDIAN% -ccs.outputFormat %OUTPUT_FORMAT% -ccs.device com.ti.ccstudio.deviceModel.C6000.GenericC64xPlusDevice -ccs.endianness %ENDIAN% -ccs.kind executable -ccs.cgtVersion %CGT_VERSION% -rtsc.xdcVersion %XDC_VERSION% -rtsc.enableDspBios -rtsc.biosVersion %BIOS_VERSION% -rtsc.buildProfile "debug" -rtsc.products "com.ti.rtsc.IPC:%IPC_VERSION%;com.ti.rtsc.SYSBIOS:%BIOS_VERSION%;ti.pdk:%PDK_VERSION%;com.ti.sdo.edma3:%EDMA_VERSION%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a -ccs.args %%I %SIMULATOR_SUPPORT_DEFINE% -ccs.overwrite full\r
168 \r
169 REM copy the macros.ini to project location\r
170 echo Copying macro.ini\r
171 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
172 \r
173 popd\r
174 )\r
175 \r
176 echo *****************************************************************************\r
177 echo Detecting Example Projects in TCP3D and importing them in the workspace %MY_WORKSPACE%\r
178 \r
179 REM Search for all the Example Project Files in the TCP3D.\r
180 for /F %%I IN ('dir /b /s *%DEVICE_NAME%*exampleproject.txt') do (\r
181 echo Detected Example Project: %%~nI\r
182 \r
183 REM Goto each directory where the example project file is located and create the projects.\r
184 pushd example\r
185 \r
186 REM Execute the command to create the project using the parameters specified above.\r
187 %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.name %%~nI_%ENDIAN% -ccs.outputFormat %OUTPUT_FORMAT% -ccs.device com.ti.ccstudio.deviceModel.C6000.GenericC64xPlusDevice -ccs.endianness %ENDIAN% -ccs.kind executable -ccs.cgtVersion %CGT_VERSION% -rtsc.xdcVersion %XDC_VERSION% -rtsc.enableDspBios -rtsc.biosVersion %BIOS_VERSION% -rtsc.buildProfile "debug" -rtsc.products "com.ti.rtsc.IPC:%IPC_VERSION%;com.ti.rtsc.SYSBIOS:%BIOS_VERSION%;ti.pdk:%PDK_VERSION%;com.ti.sdo.edma3:%EDMA_VERSION%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a -ccs.args %%I %SIMULATOR_SUPPORT_DEFINE% -ccs.overwrite full\r
188 \r
189 REM copy the macros.ini to project location\r
190 echo Copying macro.ini\r
191 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
192 \r
193 popd\r
194 )\r