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 for\r
8 @REM * TCP3D. These projects are available in the specified workspace.\r
9 @REM *\r
10 @REM * USAGE:\r
11 @REM * projectCreate.bat big\r
12 @REM * --- OR ---\r
13 @REM * projectCreate.bat\r
14 @REM *\r
15 @REM * DEPENDENCIES:\r
16 @REM * "C:\Program Files\Texas Instruments\pdk_C6657_1_0_0_1001\packages"\r
17 @REM *\r
18 @REM * Copyright (C) 2011, Texas Instruments, Inc.\r
19 @REM *****************************************************************************\r
20 @echo OFF\r
21 \r
22 REM skip checking as done for PDK\r
23 REM @call setupenv.bat\r
24 \r
25 REM *****************************************************************************\r
26 REM *****************************************************************************\r
27 REM Customer Modifiable Section\r
28 REM *****************************************************************************\r
29 REM *****************************************************************************\r
30 \r
31 REM This is to control the CCS version specific project create command\r
32 REM Set to 'no' when using CCSv5 or set to 'yes' when using CCSv4\r
33 set IS_CCS_VERSION_4=no\r
34 \r
35 REM Set to 'no' when using QT, EVM, VDB, or other hardware. Set to 'yes' only when using the simulator.\r
36 set IS_SIMULATOR_SUPPORT_NEEDED=yes\r
37 \r
38 REM Install Location for CCS. Ensure the PATH here is in compliance with the 'IS_CCS_VERSION_4' variable\r
39 REM defined above.\r
40 set CCS_INSTALL_PATH=c:\ti\ccsv5\r
41 \r
42 REM Workspace where the projects will be created in "example" and "test" folders.\r
43 set MY_WORKSPACE=.\r
44 \r
45 REM This is Endianess of the Projects being created.\r
46 REM Valid Values are 'little' and 'big'\r
47 if "%1" == "big" (\r
48 set ENDIAN=big\r
49 ) else (\r
50 set ENDIAN=little\r
51 )\r
52 \r
53 REM This is the format of the executable being created\r
54 REM Valid Values are 'ELF' and 'COFF'\r
55 set OUTPUT_FORMAT=ELF\r
56 \r
57 REM Version of CG-Tools\r
58 set CGT_VERSION=7.3.1\r
59 \r
60 REM Version of XDC\r
61 set XDC_VERSION=3.23.03.53\r
62 \r
63 REM Version of BIOS\r
64 set BIOS_VERSION=6.33.05.46\r
65 \r
66 REM Version of the IPC\r
67 set IPC_VERSION=1.24.02.27\r
68 \r
69 REM Version of the PDK\r
70 set PDK_VERSION=1.00.00.1003\r
71 \r
72 REM Version of the EDMA\r
73 set EDMA_VERSION=02.11.05\r
74 \r
75 REM RTSC Platform Name\r
76 set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
77 \r
78 REM RTSC Target \r
79 REM - Please ensure that you select this taking into account the\r
80 REM OUTPUT_FORMAT and the RTSC_PLATFORM_NAME \r
81 if "%ENDIAN%" == "big" (\r
82 set RTSC_TARGET=ti.targets.elf.C66_big_endian\r
83 ) else ( \r
84 set RTSC_TARGET=ti.targets.elf.C66\r
85 )\r
86 \r
87 REM *****************************************************************************\r
88 REM *****************************************************************************\r
89 REM Please do NOT change anything below this\r
90 REM *****************************************************************************\r
91 REM *****************************************************************************\r
92 \r
93 REM Batch file execution location\r
94 set WORKDIR_SHORT=%~sdp0\r
95 \r
96 REM Set auto create command by default for use with CCSv5\r
97 set AUTO_CREATE_COMMAND=eclipse\eclipsec -noSplash \r
98 \r
99 REM If is CCS version 4 then set auto create command for use with CCSv4\r
100 If .%IS_CCS_VERSION_4% == .yes set AUTO_CREATE_COMMAND=eclipse\jre\bin\java -jar %CCS_INSTALL_PATH%\eclipse\startup.jar\r
101 \r
102 REM Set project for Silicon or QT by default\r
103 set SIMULATOR_SUPPORT_DEFINE=\r
104 \r
105 REM If simulator support is needed then set the define\r
106 If .%IS_SIMULATOR_SUPPORT_NEEDED% == .yes set SIMULATOR_SUPPORT_DEFINE=-ccs.setCompilerOptions "--define SIMULATOR_SUPPORT"\r
107 \r
108 echo *****************************************************************************\r
109 echo Detecting UnitTest Projects in PDK and importing them in the workspace %MY_WORKSPACE%\r
110 \r
111 set listFile=testpjtlist.txt\r
112 dir /b /s *testproject.txt | findstr "tcp3" > %listFile%\r
113 REM Search for all the test Project Files in the PDK.\r
114 for /F %%I IN (%listFile%) do (\r
115 echo Detected Test Project: %%~nI\r
116 \r
117 REM Goto each directory where the test project file is located and create the projects.\r
118 pushd test\r
119 \r
120 REM Execute the command to create the project using the parameters specified above.\r
121 %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.csl_lld:%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
122 \r
123 REM copy the macros.ini to project location\r
124 copy %WORKDIR_SHORT%test\macros.ini %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
125 \r
126 popd\r
127 )\r
128 @del /q %listFile%\r
129 \r
130 echo *****************************************************************************\r
131 echo Detecting Example Projects in PDK and importing them in the workspace %MY_WORKSPACE%\r
132 \r
133 set listFile=examplepjtlist.txt\r
134 dir /b /s *exampleproject.txt | findstr "tcp3" > %listFile%\r
135 REM Search for all the Example Project Files in the PDK.\r
136 for /F %%I IN (%listFile%) do (\r
137 echo Detected Example Project: %%~nI\r
138 \r
139 REM Goto each directory where the example project file is located and create the projects.\r
140 pushd example\r
141 \r
142 REM Execute the command to create the project using the parameters specified above.\r
143 %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.csl_lld:%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
144 \r
145 REM copy the macros.ini to project location\r
146 copy %WORKDIR_SHORT%test\macros.ini %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
147 \r
148 popd\r
149 )\r
150 @del /q %listFile%\r