]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/tcp3d-lld.git/blob - projectCreate.bat
f11af728426092cfda814bc05f0e11bd68ff1bf7
[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\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 k2k 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'. 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.1\r
96 \r
97 REM Version of XDC\r
98 set XDC_VERSION=3.24.05.48\r
99 \r
100 REM Version of BIOS\r
101 set BIOS_VERSION=6.34.02.18\r
102 \r
103 REM Version of the IPC\r
104 set IPC_VERSION=1.25.00.04\r
105 \r
106 REM EDMA3 Version \r
107 set EDMA_VERSION=02.11.05\r
108 \r
109 REM Version of the PDK\r
110 set PDK_VERSION=1.00.00.07\r
111 \r
112 REM RTSC Platform Name\r
113 set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
114 \r
115 REM RTSC Target \r
116 REM - Please ensure that you select this taking into account the\r
117 REM   OUTPUT_FORMAT and the RTSC_PLATFORM_NAME \r
118 if "%ENDIAN%" == "big" (\r
119 set RTSC_TARGET=ti.targets.elf.C66_big_endian\r
120 ) else ( \r
121 set RTSC_TARGET=ti.targets.elf.C66\r
122 )\r
123 \r
124 REM *****************************************************************************\r
125 REM *****************************************************************************\r
126 REM                 Please do NOT change anything below this\r
127 REM *****************************************************************************\r
128 REM *****************************************************************************\r
129 \r
130 REM Set auto create command by default for use with CCSv5\r
131 set AUTO_CREATE_COMMAND=eclipse\eclipsec -noSplash \r
132 \r
133 REM If is CCS version 4 then set auto create command for use with CCSv4\r
134 If .%IS_CCS_VERSION_4% == .yes set AUTO_CREATE_COMMAND=eclipse\jre\bin\java -jar %CCS_INSTALL_PATH%\eclipse\startup.jar\r
135 \r
136 REM Set project for Silicon or QT by default\r
137 set SIMULATOR_SUPPORT_DEFINE=\r
138 \r
139 REM If simulator support is needed then set the define\r
140 If .%IS_SIMULATOR_SUPPORT_NEEDED% == .yes set SIMULATOR_SUPPORT_DEFINE=-ccs.setCompilerOptions "--define SIMULATOR_SUPPORT"\r
141 \r
142 echo *****************************************************************************\r
143 echo Detecting UnitTest Projects in TCP3D and importing them in the workspace %MY_WORKSPACE%\r
144 \r
145 REM Search for all the test Project Files in the TCP3D.\r
146 for /F %%I IN ('dir /b /s *%DEVICE_NAME%*testproject.txt') do (\r
147 echo Detected Test Project: %%~nI\r
148 \r
149 REM Goto each directory where the test project file is located and create the projects.\r
150 pushd test\r
151 \r
152 REM Execute the command to create the project using the parameters specified above.\r
153 %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
154 \r
155 REM copy the macros.ini to project location\r
156 echo Copying macro.ini\r
157 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
158 \r
159 popd\r
160 )\r
161 \r
162 echo *****************************************************************************\r
163 echo Detecting Example Projects in TCP3D and importing them in the workspace %MY_WORKSPACE%\r
164 \r
165 REM Search for all the Example Project Files in the TCP3D.\r
166 for /F %%I IN ('dir /b /s *%DEVICE_NAME%*exampleproject.txt') do (\r
167 echo Detected Example Project: %%~nI\r
168 \r
169 REM Goto each directory where the example project file is located and create the projects.\r
170 pushd example\r
171 \r
172 REM Execute the command to create the project using the parameters specified above.\r
173 %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
174 \r
175 REM copy the macros.ini to project location\r
176 echo Copying macro.ini\r
177 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
178 \r
179 popd\r
180 )\r