1 @REM ******************************************************************************\r
2 @REM * FILE PURPOSE: PDK Unit Test and Example Project Creator\r
3 @REM ******************************************************************************\r
4 @REM * FILE NAME: pdkProjectCreate.bat\r
5 @REM *\r
6 @REM * DESCRIPTION: \r
7 @REM * The script file is used to create the test and example projects of all\r
8 @REM * components under PDK. These projects are available in the specified\r
9 @REM * workspace.\r
10 @REM *\r
11 @REM * Syntax:\r
12 @REM * pdkProjectCreate.bat [soc] [board] [endian] [module] [project type] [processor] [pdkDir]\r
13 @REM *\r
14 @REM * Description: (first option is default)\r
15 @REM * soc - AM335x / AM437x / AM571x / AM572x / AM574x / K2E / K2G / K2K / K2H / K2L /\r
16 @REM * C6678 / C6657 / DRA72x / DRA75x / DRA78x / OMAPL137 / OMAPL138 / C6748 / am65xx\r
17 @REM * board - all (use "all" for K2X and C66X SOCs)\r
18 @REM * -or-\r
19 @REM * Refer to pdk_<soc>_<version>\packages\ti\board\lib\r
20 @REM * for valid board inputs for the soc\r
21 @REM * endian - little / big\r
22 @REM * module - all\r
23 @REM * -or-\r
24 @REM * aif2 / bcp / cppi / csl / dfe / emac / fatfs / fm / fftc / \r
25 @REM * gpio / hyplnk / i2c / icss_emac / iqn2 / mcasp / mcbsp / mmap / mmcsd /\r
26 @REM * nimu / nimu_icss / nwal / osal / pa / pcie / pktlib / pruss / qm / rm /\r
27 @REM * sa /serdes-diag / spi / srio / tcp3d / tfw / transportqmss /\r
28 @REM * transportsrio / tsip / uart / usb / wdtimer / vps / dcan / dss / lcdc\r
29 @REM * project type - all / example / test \r
30 @REM * processor - arm / dsp / m4 / mpu / mcu\r
31 @REM * pdkDir - THIS FILE LOCATION / "C:\ti\pdk_<soc>_<version>\packages"\r
32 @REM *\r
33 @REM * Example:\r
34 @REM * a) pdkProjectCreate.bat\r
35 @REM * - Creates all module projects for the AM335x soc for arm little endian\r
36 @REM * b) pdkProjectCreate.bat AM437x\r
37 @REM * - Creates all module projects for the AM437x soc for arm little endian\r
38 @REM * c) pdkProjectCreate.bat AM437x idkAM437x\r
39 @REM * - Creates all module projects for idkAM437x device for arm little endian\r
40 @REM * d) pdkProjectCreate.bat AM571x evmAM571x little\r
41 @REM * - Creates all module projects for evmAM571x device for arm little endian\r
42 @REM * e) pdkProjectCreate.bat AM571x evmAM571x little i2c all dsp\r
43 @REM * - Creates all i2c module projects for evmAM571x device for dsp little endian\r
44 @REM * f) pdkProjectCreate.bat K2H all little i2c example arm\r
45 @REM * - Creates i2c module example projects for K2H device for arm little endian\r
46 @REM * g) pdkProjectCreate.bat C6678 all little hyplnk test dsp\r
47 @REM * - Creates hyplnk module test projects for C6678 device for dsp little endian\r
48 @REM *\r
49 @REM * Copyright (C) 2012-2019, Texas Instruments, Inc.\r
50 @REM *****************************************************************************\r
51 @echo OFF\r
52 setlocal enabledelayedexpansion\r
53 \r
54 REM Lists of valid input parameters - MUST be updated as new input parameters are added\r
55 REM *****************************************************************************\r
56 set soc_list=AM335x AM437x AM571x AM572x AM574x K2E K2K K2H K2L K2G C6678 C6657 DRA72x DRA75x DRA78x OMAPL137 OMAPL138 C6748 am65xx\r
57 set endian_list=little big\r
58 set module_list=all aif2 bcp cppi csl dfe emac fatfs fm fftc gpio gpmc hyplnk i2c icss_emac iqn2 mcasp mcbsp mmap mmcsd nimu nimu_icss nwal osal pa pcie pktlib pruss qm rm sa serdes_diag spi srio tcp3d tfw transportqmss transportsrio tsip uart usb wdtimer vps dcan dss lcdc timeSync\r
59 set projectType_list=all example test\r
60 set proc_list=arm dsp m4 mpu mcu\r
61 \r
62 REM Parameter Validation: Check if the argument was passed to the batch file.\r
63 REM *****************************************************************************\r
64 REM Argument [soc] is used to set SOC variable.\r
65 set tempVar1=%1\r
66 if not defined tempVar1 goto nosoc\r
67 set SOC=%tempVar1%\r
68 goto socdone\r
69 :nosoc\r
70 set SOC=AM335x\r
71 :socdone\r
72 \r
73 REM Argument [board] is used to set BOARD variable.\r
74 REM This is the board type of the soc for which project are to be created.\r
75 set tempVar2=%2\r
76 if not defined tempVar2 goto noboard\r
77 set BOARD=%tempVar2%\r
78 goto boarddone\r
79 :noboard\r
80 set BOARD=all\r
81 :boarddone\r
82 \r
83 REM Argument [endian] is used to set ENDIAN variable.\r
84 REM This is Endianess of the projects being created.\r
85 REM Valid Values are 'little' and 'big'. Defaults to 'little'.\r
86 set tempVar3=%3\r
87 if not defined tempVar3 goto littleendian\r
88 set ENDIAN=%tempVar3%\r
89 goto endiandone\r
90 :littleendian\r
91 set ENDIAN=little\r
92 :endiandone\r
93 \r
94 REM Argument [module] is used to set MODULE variable.\r
95 REM This is specific module for which projects are created.\r
96 REM Valid Values are LLD name. Defaults to all LLD's.\r
97 set tempVar4=%4\r
98 if not defined tempVar4 goto nomodule\r
99 set MODULE=%tempVar4%\r
100 goto moduledone\r
101 :nomodule\r
102 set MODULE=all\r
103 :moduledone\r
104 \r
105 REM Argument [project type] is used to set PROJECT_TYPE variable.\r
106 REM This is the type of projects that are created\r
107 REM Valid Values are all, example, or test. Defaults to all. \r
108 set tempVar5=%5\r
109 if not defined tempVar5 goto noProjectType\r
110 set PROJECT_TYPE=%tempVar5%\r
111 goto projectTypeDone\r
112 :noProjectType\r
113 set PROJECT_TYPE=all\r
114 :projectTypeDone\r
115 \r
116 REM Argument [processor] is used to set PROCESSOR variable.\r
117 REM This is specific processor type for which projects are created.\r
118 REM Valid Values are arm, dsp, or m4 . Defaults to arm.\r
119 set tempVar6=%6\r
120 if not defined tempVar6 goto noprocessor\r
121 set PROCESSOR=%tempVar6%\r
122 goto processordone\r
123 :noprocessor\r
124 set PROCESSOR=arm\r
125 :processordone\r
126 \r
127 REM Argument [pdkDir] is used to set PDK_SHORT_NAME. This is PDK directory\r
128 REM where project description files are located. If there is no value passed,\r
129 REM it defaults to the file location directory. Then convert the variable to \r
130 REM short name to avoid issues using batch file commands.\r
131 set tempVar7=%7\r
132 if not defined tempVar7 goto noparameter\r
133 set PDK_SHORT_NAME=%tempVar7%\r
134 goto done\r
135 :noparameter\r
136 set PDK_SHORT_NAME=%~sdp0\r
137 :done\r
138 \r
139 if not defined SDK_INSTALL_PATH (\r
140 set SDK_INSTALL_PATH=__SDK__INSTALL_DIR__\r
141 )\r
142 \r
143 REM *****************************************************************************\r
144 \r
145 echo =========================================================================\r
146 echo Configuration:\r
147 echo. SOC : %SOC%\r
148 echo BOARD : %BOARD%\r
149 echo. ENDIAN : %ENDIAN%\r
150 echo. MODULE : %MODULE%\r
151 echo. PROJECT_TYPE : %PROJECT_TYPE%\r
152 echo. PROCESSOR : %PROCESSOR%\r
153 echo. PDK_SHORT_NAME : %PDK_SHORT_NAME%\r
154 echo =========================================================================\r
155 echo Checking Configuration...\r
156 \r
157 for %%a in (%soc_list%) do (\r
158 if %SOC% == %%a (\r
159 goto end_soc_check\r
160 )\r
161 )\r
162 echo ERROR: SOC (%SOC%) is invalid\r
163 goto CONFIG_ERR\r
164 :end_soc_check\r
165 \r
166 if %BOARD% == all (\r
167 goto end_board_check\r
168 )\r
169 if %BOARD% == iceAMIC110 (\r
170 if %SOC% == AM335x (\r
171 goto end_board_check\r
172 )\r
173 goto board_check_error\r
174 )\r
175 set board_type=!BOARD:%SOC%=!\r
176 if not %board_type% == %BOARD% (\r
177 goto end_board_check\r
178 )\r
179 :board_check_error\r
180 echo ERROR: Board (%BOARD%) is invalid for the specified SOC (%SOC%)\r
181 goto CONFIG_ERR\r
182 :end_board_check\r
183 \r
184 for %%a in (%endian_list%) do (\r
185 if %ENDIAN% == %%a (\r
186 goto end_endian_check\r
187 )\r
188 )\r
189 echo ERROR: Endian (%ENDIAN%) is invalid\r
190 goto CONFIG_ERR\r
191 :end_endian_check\r
192 \r
193 for %%a in (%module_list%) do (\r
194 if %MODULE% == %%a (\r
195 goto end_module_check\r
196 )\r
197 )\r
198 echo ERROR: Module (%MODULE%) is invalid\r
199 goto CONFIG_ERR\r
200 :end_module_check\r
201 \r
202 for %%a in (%projectType_list%) do (\r
203 if %PROJECT_TYPE% == %%a (\r
204 goto end_projectType_check\r
205 )\r
206 )\r
207 echo ERROR: Project type (%PROJECT_TYPE%) is invalid\r
208 goto CONFIG_ERR\r
209 :end_projectType_check\r
210 \r
211 for %%a in (%proc_list%) do (\r
212 if %PROCESSOR% == %%a (\r
213 goto end_proc_check\r
214 )\r
215 )\r
216 echo ERROR: Processor (%PROCESSOR%) is invalid\r
217 goto CONFIG_ERR\r
218 :end_proc_check\r
219 \r
220 if %SOC% == AM335x (\r
221 if %PROCESSOR% == dsp (\r
222 echo ERROR: The AM335x soc does not contain a DSP processor\r
223 goto CONFIG_ERR\r
224 ) else if %PROCESSOR% == m4 (\r
225 echo ERROR: The AM335x soc does not contain a M4 processor\r
226 goto CONFIG_ERR\r
227 )\r
228 \r
229 if %ENDIAN% == big (\r
230 echo ERROR: The AM335x soc's arm does not support big endian\r
231 goto CONFIG_ERR\r
232 )\r
233 ) else if %SOC% == AM437x (\r
234 if %PROCESSOR% == dsp (\r
235 echo ERROR: The AM437x soc does not contain a DSP processor\r
236 goto CONFIG_ERR\r
237 ) else if %PROCESSOR% == m4 (\r
238 echo ERROR: The AM437x soc does not contain a M4 processor\r
239 goto CONFIG_ERR\r
240 )\r
241 \r
242 if %ENDIAN% == big (\r
243 echo ERROR: The AM437x soc's arm does not support big endian\r
244 goto CONFIG_ERR\r
245 )\r
246 ) else if %SOC% == AM571x (\r
247 if %ENDIAN% == big (\r
248 echo ERROR: The AM571x soc's processor's do not support big endian\r
249 goto CONFIG_ERR\r
250 )\r
251 ) else if %SOC% == AM572x (\r
252 if %ENDIAN% == big (\r
253 echo ERROR: The AM572x soc's processor's do not support big endian\r
254 goto CONFIG_ERR\r
255 )\r
256 ) else if %SOC% == AM574x (\r
257 if %ENDIAN% == big (\r
258 echo ERROR: The AM574x soc's processor's do not support big endian\r
259 goto CONFIG_ERR\r
260 )\r
261 ) else if %SOC% == K2K (\r
262 if %PROCESSOR% == m4 (\r
263 echo ERROR: The K2K soc does not contain a M4 processor\r
264 goto CONFIG_ERR\r
265 )\r
266 \r
267 if %PROCESSOR% == arm (\r
268 if %ENDIAN% == big (\r
269 echo ERROR: The K2K soc's arm does not support big endian\r
270 goto CONFIG_ERR\r
271 )\r
272 )\r
273 ) else if %SOC% == K2H (\r
274 if %PROCESSOR% == m4 (\r
275 echo ERROR: The K2H soc does not contain a M4 processor\r
276 goto CONFIG_ERR\r
277 )\r
278 \r
279 if %PROCESSOR% == arm (\r
280 if %ENDIAN% == big (\r
281 echo ERROR: The K2H soc's arm does not support big endian\r
282 goto CONFIG_ERR\r
283 )\r
284 )\r
285 ) else if %SOC% == K2E (\r
286 if %PROCESSOR% == m4 (\r
287 echo ERROR: The K2E soc does not contain a M4 processor\r
288 goto CONFIG_ERR\r
289 )\r
290 \r
291 if %PROCESSOR% == arm (\r
292 if %ENDIAN% == big (\r
293 echo ERROR: The K2E soc's arm does not support big endian\r
294 goto CONFIG_ERR\r
295 )\r
296 )\r
297 ) else if %SOC% == K2L (\r
298 if %PROCESSOR% == m4 (\r
299 echo ERROR: The K2L soc does not contain a M4 processor\r
300 goto CONFIG_ERR\r
301 )\r
302 \r
303 if %PROCESSOR% == arm (\r
304 if %ENDIAN% == big (\r
305 echo ERROR: The K2L soc's arm does not support big endian\r
306 goto CONFIG_ERR\r
307 )\r
308 )\r
309 ) else if %SOC% == K2G (\r
310 if %PROCESSOR% == m4 (\r
311 echo ERROR: The K2G soc does not contain a M4 processor\r
312 goto CONFIG_ERR\r
313 )\r
314 \r
315 if %PROCESSOR% == arm (\r
316 if %ENDIAN% == big (\r
317 echo ERROR: The K2G soc's arm does not support big endian\r
318 goto CONFIG_ERR\r
319 )\r
320 )\r
321 ) else if %SOC% == OMAPL137 (\r
322 if %PROCESSOR% == m4 (\r
323 echo ERROR: The OMAPL137 soc does not contain a M4 processor\r
324 goto CONFIG_ERR\r
325 )\r
326 \r
327 if %PROCESSOR% == arm (\r
328 if %ENDIAN% == big (\r
329 echo ERROR: The OMAPL137 soc's arm does not support big endian\r
330 goto CONFIG_ERR\r
331 )\r
332 )\r
333 if %PROCESSOR% == dsp (\r
334 if %ENDIAN% == big (\r
335 echo ERROR: The OMAPL137 soc's dsp does not support big endian\r
336 goto CONFIG_ERR\r
337 )\r
338 )\r
339 ) else if %SOC% == OMAPL138 (\r
340 if %PROCESSOR% == m4 (\r
341 echo ERROR: The OMAPL138 soc does not contain a M4 processor\r
342 goto CONFIG_ERR\r
343 )\r
344 \r
345 if %PROCESSOR% == arm (\r
346 if %ENDIAN% == big (\r
347 echo ERROR: The OMAPL138 soc's arm does not support big endian\r
348 goto CONFIG_ERR\r
349 )\r
350 )\r
351 if %PROCESSOR% == dsp (\r
352 if %ENDIAN% == big (\r
353 echo ERROR: The OMAPL138 soc's dsp does not support big endian\r
354 goto CONFIG_ERR\r
355 )\r
356 )\r
357 ) else if %SOC% == C6748 (\r
358 if %PROCESSOR% == m4 (\r
359 echo ERROR: The C6748 soc does not contain a M4 processor\r
360 goto CONFIG_ERR\r
361 )\r
362 if %PROCESSOR% == arm (\r
363 echo ERROR: The C6748 soc does not contain an arm processor\r
364 goto CONFIG_ERR\r
365 )\r
366 if %PROCESSOR% == dsp (\r
367 if %ENDIAN% == big (\r
368 echo ERROR: The C6748 soc's dsp does not support big endian\r
369 goto CONFIG_ERR\r
370 )\r
371 )\r
372 ) else if %SOC% == C6678 (\r
373 if %PROCESSOR% == m4 (\r
374 echo ERROR: The C6678 soc does not contain a M4 processor\r
375 goto CONFIG_ERR\r
376 )\r
377 \r
378 if %PROCESSOR% == arm (\r
379 echo ERROR: The C6678 soc does not contain an arm processor\r
380 goto CONFIG_ERR\r
381 )\r
382 ) else if %SOC% == C6657 (\r
383 if %PROCESSOR% == m4 (\r
384 echo ERROR: The C6657 soc does not contain a M4 processor\r
385 goto CONFIG_ERR\r
386 )\r
387 \r
388 if %PROCESSOR% == arm (\r
389 echo ERROR: The C6657 soc does not contain an arm processor\r
390 goto CONFIG_ERR\r
391 )\r
392 ) else if %SOC% == DRA72x (\r
393 if %ENDIAN% == big (\r
394 echo ERROR: The DRA72x soc's processor's do not support big endian\r
395 goto CONFIG_ERR\r
396 )\r
397 ) else if %SOC% == DRA75x (\r
398 if %ENDIAN% == big (\r
399 echo ERROR: The DRA75x soc's processor's do not support big endian\r
400 goto CONFIG_ERR\r
401 )\r
402 ) else if %SOC% == DRA78x (\r
403 if %ENDIAN% == big (\r
404 echo ERROR: the DRA78x soc's processor's do not support big endian\r
405 goto CONFIG_ERR\r
406 )\r
407 ) else if %SOC% == am65xx (\r
408 if %PROCESSOR% == dsp (\r
409 echo ERROR: The AM65xx soc does not contain a DSP processor\r
410 goto CONFIG_ERR\r
411 )\r
412 if %PROCESSOR% == m4 (\r
413 echo ERROR: The AM65xx soc does not contain a M4 processor\r
414 goto CONFIG_ERR\r
415 )\r
416 if %ENDIAN% == big (\r
417 echo ERROR: The AM65xx soc's processor's do not support big endian\r
418 goto CONFIG_ERR\r
419 )\r
420 ) else (\r
421 echo ERROR: Invalid soc\r
422 goto CONFIG_ERR\r
423 )\r
424 \r
425 goto CONFIG_COMPLETE\r
426 \r
427 :CONFIG_ERR\r
428 echo Exiting...\r
429 echo =========================================================================\r
430 goto ENDSCRIPT\r
431 \r
432 :CONFIG_COMPLETE\r
433 echo Complete\r
434 echo =========================================================================\r
435 \r
436 REM *****************************************************************************\r
437 REM * Version Information of the various tools etc required to build the test\r
438 REM * projects. Customers are free to modify these to meet their requirements.\r
439 REM *****************************************************************************\r
440 \r
441 REM This is to control the CCS version specific project create command\r
442 REM Set to 'no' when using CCSv8 or set to 'yes' when using CCSv4\r
443 set IS_CCS_VERSION_4=no\r
444 \r
445 REM Set to 'no' when using QT, EVM, VDB, or other hardware. Set to 'yes' only when using the simulator.\r
446 set IS_SIMULATOR_SUPPORT_NEEDED=no\r
447 \r
448 if not defined CCS_INSTALL_PATH (\r
449 set CCS_INSTALL_PATH=C:/ti/ccs930/ccs\r
450 )\r
451 \r
452 REM Workspace where the PDK projects will be created.\r
453 set MY_WORKSPACE=%PDK_SHORT_NAME%\MyExampleProjects\r
454 \r
455 REM macros.ini location\r
456 set MACROS_FILE=%PDK_SHORT_NAME%\macros.ini\r
457 \r
458 REM This is the format of the executable being created\r
459 REM Valid Values are 'ELF' and 'COFF'\r
460 set OUTPUT_FORMAT=ELF\r
461 \r
462 REM Version of CG-Tools\r
463 set CGT_VERSION=8.3.2\r
464 \r
465 REM Version of CG-ARM-Tools for M4\r
466 set CGT_M4_VERSION=18.12.5.LTS\r
467 \r
468 REM Version of XDC\r
469 set XDC_VERSION=3.55.02.22\r
470 \r
471 REM Version of BIOS\r
472 set BIOS_VERSION=6.76.03.01\r
473 \r
474 REM Version of CG-Tools for ARM\r
475 set CGT_VERSION_ARM=GNU_7.2.1:Linaro\r
476 \r
477 REM Version of CG-Tools for ARM\r
478 set CGT_VERSION_ARM_A53=GNU_7.2.1:Linaro aarch64\r
479 \r
480 REM Version of CG-Tools for ARM\r
481 set CGT_VERSION_ARM9=18.12.5.LTS\r
482 \r
483 REM Version of the IPC\r
484 set IPC_VERSION=__IPC_VER__\r
485 \r
486 REM EDMA3 Version\r
487 set EDMA_VERSION=2.12.05.30E\r
488 \r
489 REM Version of the PDK\r
490 set PDK_VERSION=__PDK_VER__\r
491 \r
492 REM Version of the NDK\r
493 set NDK_VERSION=3.61.01.01\r
494 \r
495 REM Version of UIA\r
496 set UIA_VERSION=2.30.01.02\r
497 \r
498 REM PDK Part Number & Platform name\r
499 if %SOC% == K2K (\r
500 set PDK_PARTNO=TCI6638\r
501 set PDK_ECLIPSE_ID=com.ti.pdk.k2hk\r
502 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6638K2K\r
503 if %PROCESSOR% == arm (\r
504 set RTSC_TARGET=gnu.targets.arm.A15F\r
505 set CCS_DEVICE="Cortex A.TCI6638K2K"\r
506 )\r
507 ) else if %SOC% == K2H (\r
508 set PDK_PARTNO=TCI6636\r
509 set PDK_ECLIPSE_ID=com.ti.pdk.k2hk\r
510 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6636K2H\r
511 if %PROCESSOR% == arm (\r
512 set RTSC_TARGET=gnu.targets.arm.A15F\r
513 set CCS_DEVICE="Cortex A.66AK2H12"\r
514 )\r
515 ) else if %SOC% == K2L (\r
516 set PDK_PARTNO=TCI6630\r
517 set PDK_ECLIPSE_ID=com.ti.pdk.k2l\r
518 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6630K2L\r
519 if %PROCESSOR% == arm (\r
520 set RTSC_TARGET=gnu.targets.arm.A15F\r
521 set CCS_DEVICE="Cortex A.TCI6630K2L"\r
522 )\r
523 ) else if %SOC% == K2E (\r
524 set PDK_PARTNO=66AK2E05\r
525 set PDK_ECLIPSE_ID=com.ti.pdk.k2e\r
526 set RTSC_PLATFORM_NAME=ti.platforms.evmC66AK2E\r
527 if %PROCESSOR% == arm (\r
528 set RTSC_TARGET=gnu.targets.arm.A15F\r
529 set CCS_DEVICE="Cortex A.66AK2E05"\r
530 )\r
531 ) else if %SOC% == K2G (\r
532 set PDK_PARTNO=66AK2G02\r
533 set PDK_ECLIPSE_ID=com.ti.pdk.k2g\r
534 set RTSC_PLATFORM_NAME=ti.platforms.evmTCI66AK2G02\r
535 if %PROCESSOR% == arm (\r
536 set RTSC_TARGET=gnu.targets.arm.A15F\r
537 set CCS_DEVICE="Cortex A.66AK2G02"\r
538 )\r
539 ) else if %SOC% == AM571x (\r
540 set PDK_PARTNO=AM571X\r
541 set PDK_ECLIPSE_ID=com.ti.pdk.am57xx\r
542 set RTSC_PLATFORM_NAME=ti.platforms.idkAM571X\r
543 if %PROCESSOR% == arm (\r
544 set RTSC_TARGET=gnu.targets.arm.A15F\r
545 set CCS_DEVICE="Cortex A.AM5728_RevA"\r
546 ) else if %PROCESSOR% == m4 (\r
547 set RTSC_TARGET=ti.targets.arm.elf.M4\r
548 set CCS_DEVICE="Cortex M.AM5728_RevA"\r
549 )\r
550 ) else if %SOC% == AM572x (\r
551 set PDK_PARTNO=AM572X\r
552 set PDK_ECLIPSE_ID=com.ti.pdk.am57xx\r
553 if %BOARD% == idkAM572x (\r
554 set RTSC_PLATFORM_NAME=ti.platforms.idkAM572X\r
555 ) else (\r
556 set RTSC_PLATFORM_NAME=ti.platforms.evmAM572X\r
557 )\r
558 if %PROCESSOR% == arm (\r
559 set RTSC_TARGET=gnu.targets.arm.A15F\r
560 set CCS_DEVICE="Cortex A.AM5728_RevA"\r
561 ) else if %PROCESSOR% == m4 (\r
562 set RTSC_TARGET=ti.targets.arm.elf.M4\r
563 set CCS_DEVICE="Cortex M.AM5728_RevA"\r
564 )\r
565 ) else if %SOC% == AM574x (\r
566 set PDK_PARTNO=AM574X\r
567 set PDK_ECLIPSE_ID=com.ti.pdk.am57xx\r
568 set RTSC_PLATFORM_NAME=ti.platforms.idkAM572X\r
569 if %PROCESSOR% == arm (\r
570 set RTSC_TARGET=gnu.targets.arm.A15F\r
571 set CCS_DEVICE="Cortex A.AM5728_RevA"\r
572 ) else if %PROCESSOR% == m4 (\r
573 set RTSC_TARGET=ti.targets.arm.elf.M4\r
574 set CCS_DEVICE="Cortex M.AM5728_RevA"\r
575 )\r
576 ) else if %SOC% == AM335x (\r
577 set PDK_PARTNO=AM335\r
578 set PDK_ECLIPSE_ID=com.ti.pdk.am335x\r
579 set RTSC_PLATFORM_NAME=ti.platforms.evmAM3359\r
580 set RTSC_TARGET=gnu.targets.arm.A8F\r
581 set CCS_DEVICE="Cortex A.AM3359.ICE_AM3359"\r
582 ) else if %SOC% == AM437x (\r
583 set PDK_PARTNO=AM437\r
584 set PDK_ECLIPSE_ID=com.ti.pdk.am437x\r
585 set RTSC_PLATFORM_NAME=ti.platforms.evmAM437X\r
586 set RTSC_TARGET=gnu.targets.arm.A9F\r
587 set CCS_DEVICE="Cortex A.AM4379.IDK_AM437X"\r
588 ) else if %SOC% == OMAPL137 (\r
589 set PDK_PARTNO=OMAPL137\r
590 set PDK_ECLIPSE_ID=com.ti.pdk.omapl137\r
591 set RTSC_PLATFORM_NAME=ti.platforms.evmOMAPL137\r
592 if %PROCESSOR% == arm (\r
593 set RTSC_TARGET=ti.targets.arm.elf.Arm9\r
594 set CCS_DEVICE="ARM9.OMAPL137"\r
595 )\r
596 ) else if %SOC% == OMAPL138 (\r
597 set PDK_PARTNO=OMAPL138\r
598 set PDK_ECLIPSE_ID=com.ti.pdk.omapl138\r
599 set RTSC_PLATFORM_NAME=ti.platforms.evmOMAPL138\r
600 if %PROCESSOR% == arm (\r
601 set RTSC_TARGET=ti.targets.arm.elf.Arm9\r
602 set CCS_DEVICE="ARM9.OMAPL138"\r
603 )\r
604 )else if %SOC% == C6748 (\r
605 REM C6748 is the alias for OMAPL138 where the OMAPL138 settings will\r
606 REM be used to create projects for C6748 SOC.\r
607 set SOC=OMAPL138\r
608 set BOARD=lcdkOMAPL138\r
609 set PDK_PARTNO=OMAPL138\r
610 set PDK_ECLIPSE_ID=com.ti.pdk.omapl138\r
611 set RTSC_PLATFORM_NAME=ti.platforms.evmOMAPL138\r
612 ) else if %SOC% == C6678 (\r
613 set PDK_PARTNO=C6678L\r
614 set PDK_ECLIPSE_ID=com.ti.pdk.c667x\r
615 set RTSC_PLATFORM_NAME=ti.platforms.evm6678\r
616 ) else if %SOC% == C6657 (\r
617 set PDK_PARTNO=C6657\r
618 set PDK_ECLIPSE_ID=com.ti.pdk.c665x\r
619 set RTSC_PLATFORM_NAME=ti.platforms.evm6657\r
620 ) else if %SOC% == DRA72x (\r
621 set PDK_PARTNO=DRA72x\r
622 set PDK_ECLIPSE_ID=com.ti.pdk.dra7xx\r
623 set RTSC_PLATFORM_NAME=ti.platforms.evmDRA7XX\r
624 if %PROCESSOR% == arm (\r
625 set RTSC_TARGET=gnu.targets.arm.A15F\r
626 set CCS_DEVICE="Cortex A.DRA72x"\r
627 ) else if %PROCESSOR% == m4 (\r
628 set RTSC_TARGET=ti.targets.arm.elf.M4\r
629 set CCS_DEVICE="Cortex M.DRA72x"\r
630 )\r
631 ) else if %SOC% == DRA75x (\r
632 set PDK_PARTNO=DRA75x\r
633 set PDK_ECLIPSE_ID=com.ti.pdk.dra7xx\r
634 set RTSC_PLATFORM_NAME=ti.platforms.evmDRA7XX\r
635 if %PROCESSOR% == arm (\r
636 set RTSC_TARGET=gnu.targets.arm.A15F\r
637 set CCS_DEVICE="Cortex A.DRA75x_DRA74x"\r
638 ) else if %PROCESSOR% == m4 (\r
639 set RTSC_TARGET=ti.targets.arm.elf.M4\r
640 set CCS_DEVICE="Cortex M.DRA75x_DRA74x"\r
641 )\r
642 ) else if %SOC% == DRA78x (\r
643 set PDK_PARTNO=DRA78x\r
644 set PDK_ECLIPSE_ID=com.ti.pdk.dra7xx\r
645 set RTSC_PLATFORM_NAME=ti.platforms.evmTDA3XX\r
646 if %PROCESSOR% == m4 (\r
647 set RTSC_TARGET=ti.targets.arm.elf.M4\r
648 set CCS_DEVICE="Cortex M.TDA3x"\r
649 )\r
650 ) else if %SOC% == am65xx (\r
651 set PDK_PARTNO=AM65XX\r
652 set PDK_ECLIPSE_ID=com.ti.pdk.am65xx\r
653 if %PROCESSOR% == mpu (\r
654 set RTSC_PLATFORM_NAME=ti.platforms.cortexA:AM65X\r
655 set RTSC_TARGET=gnu.targets.arm.A53F\r
656 set CCS_DEVICE="Cortex A.AM6548"\r
657 ) else if %PROCESSOR% == mcu (\r
658 set RTSC_PLATFORM_NAME=ti.platforms.cortexR:AM65X\r
659 set RTSC_TARGET=ti.targets.arm.elf.R5F\r
660 set CCS_DEVICE="Cortex R.AM6548"\r
661 )\r
662 ) else (\r
663 REM Need to exit the batch script cleanly \r
664 set PDK_PARTNO=TCI6634\r
665 set PDK_ECLIPSE_ID=ti.pdk\r
666 set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
667 )\r
668 \r
669 REM RTSC Target \r
670 REM - Please ensure that you select this taking into account the\r
671 REM OUTPUT_FORMAT and the RTSC_PLATFORM_NAME \r
672 if %PROCESSOR% == dsp (\r
673 if %ENDIAN% == big (\r
674 set RTSC_TARGET=ti.targets.elf.C66_big_endian\r
675 set CCS_DEVICE="com.ti.ccstudio.deviceModel.C6000.GenericC64xPlusDevice"\r
676 set DSP_TYPE=c66\r
677 ) else (\r
678 if %SOC% == OMAPL137 (\r
679 set RTSC_TARGET=ti.targets.elf.C674\r
680 set CCS_DEVICE="com.ti.ccstudio.deviceModel.C6000.GenericC674xDevice"\r
681 set DSP_TYPE=c674x\r
682 ) else if %SOC% == OMAPL138 (\r
683 set RTSC_TARGET=ti.targets.elf.C674\r
684 set CCS_DEVICE="com.ti.ccstudio.deviceModel.C6000.GenericC674xDevice"\r
685 set DSP_TYPE=c674x\r
686 ) else (\r
687 set RTSC_TARGET=ti.targets.elf.C66\r
688 set CCS_DEVICE="com.ti.ccstudio.deviceModel.C6000.GenericC64xPlusDevice"\r
689 set DSP_TYPE=c66\r
690 )\r
691 )\r
692 )\r
693 \r
694 echo PDK_PARTNO : %PDK_PARTNO%\r
695 echo PDK_ECLIPSE_ID : %PDK_ECLIPSE_ID%\r
696 echo RTSC_PLATFORM_NAME : %RTSC_PLATFORM_NAME%\r
697 echo. RTSC_TARGET : %RTSC_TARGET%\r
698 echo. CCS_DEVICE : %CCS_DEVICE%\r
699 REM *****************************************************************************\r
700 REM *****************************************************************************\r
701 REM Please do NOT change anything below this\r
702 REM *****************************************************************************\r
703 REM *****************************************************************************\r
704 \r
705 REM Set auto create command by default for use with CCSv8\r
706 set AUTO_CREATE_COMMAND=eclipse\eclipsec -noSplash\r
707 \r
708 REM If is CCS version 4 then set auto create command for use with CCSv4\r
709 if .%IS_CCS_VERSION_4% == .yes set AUTO_CREATE_COMMAND=eclipse\jre\bin\java -jar %CCS_INSTALL_PATH%\eclipse\startup.jar\r
710 \r
711 REM Set project for Silicon or QT by default\r
712 set SIMULATOR_SUPPORT_DEFINE=\r
713 \r
714 REM If simulator support is needed then set the define\r
715 if .%IS_SIMULATOR_SUPPORT_NEEDED% == .yes set SIMULATOR_SUPPORT_DEFINE=-ccs.setCompilerOptions "--define SIMULATOR_SUPPORT"\r
716 \r
717 REM Goto the PDK Installation Path.\r
718 \r
719 pushd %PDK_SHORT_NAME%\r
720 \r
721 echo *****************************************************************************\r
722 echo Detecting all projects in PDK and importing them in the workspace %MY_WORKSPACE%\r
723 \r
724 set RTSC_PRODUCTS=com.ti.rtsc.SYSBIOS:%BIOS_VERSION%;%PDK_ECLIPSE_ID%:%PDK_VERSION%\r
725 \r
726 REM check version of the NDK IPC EDMA and UIA\r
727 if exist "%SDK_INSTALL_PATH%/edma3_lld_%EDMA_VERSION:.=_%" (\r
728 set RTSC_EDMA=;com.ti.sdo.edma3:%EDMA_VERSION%\r
729 )\r
730 \r
731 if %SOC% == AM335x goto skip_ipc\r
732 if %SOC% == AM437x goto skip_ipc\r
733 \r
734 if exist "%SDK_INSTALL_PATH%/ipc_%IPC_VERSION:.=_%" (\r
735 set RTSC_IPC=;com.ti.rtsc.IPC:%IPC_VERSION%\r
736 )\r
737 :skip_ipc\r
738 if exist "%SDK_INSTALL_PATH%/ndk_%NDK_VERSION:.=_%" (\r
739 set RTSC_NDK=;com.ti.rtsc.NDK:%NDK_VERSION%\r
740 )\r
741 if exist "%SDK_INSTALL_PATH%/uia_%UIA_VERSION:.=_%" (\r
742 set RTSC_UIA=;com.ti.uia:%UIA_VERSION%\r
743 )\r
744 \r
745 set RTSC_PRODUCTS="%RTSC_PRODUCTS%%RTSC_EDMA%%RTSC_IPC%%RTSC_NDK%%RTSC_UIA%"\r
746 \r
747 REM Set MODULE to null string so it picks up all projects of PROCESSOR\r
748 if %MODULE% == all set MODULE=""\r
749 \r
750 REM Set BOARD to equal the SOC if BOARD is set to "all". All projects for the\r
751 REM SOC will be picked up\r
752 REM Additionally for AM335x, check for AMIC110 board\r
753 set AMIC110BOARD=\r
754 if %BOARD% == all set BOARD=%SOC%\r
755 if %BOARD% == AM335x set AMIC110BOARD="*%MODULE%*AMIC110*arm*roject.txt"\r
756 REM Set MODULE to null string so it picks up all projects of PROCESSOR\r
757 if %MODULE% == all set MODULE=""\r
758 REM Set PROJECT_TYPE to null string so it picks up all project types\r
759 if %PROJECT_TYPE% == all set PROJECT_TYPE=""\r
760 \r
761 if %PROCESSOR% == dsp (\r
762 REM Search for all the dsp test Project Files in the PDK.\r
763 for /F %%I IN ('dir /b /s *%MODULE%*%BOARD%*%DSP_TYPE%*%PROJECT_TYPE%*roject.txt') do (\r
764 set project_detected=1\r
765 \r
766 echo Detected Test Project: %%~nI\r
767 \r
768 REM Goto each directory where the test project file is located and create the projects.\r
769 pushd %%~dI%%~pI\r
770 \r
771 REM Execute the command to create the project using the parameters specified above.\r
772 %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.name %%~nI -ccs.outputFormat %OUTPUT_FORMAT% -ccs.setCompilerOptions "-DUSE_BIOS" -ccs.device %CCS_DEVICE% -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 "%RTSC_PRODUCTS%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a -ccs.args %%~nI%%~xI %SIMULATOR_SUPPORT_DEFINE% -ccs.overwrite full -ccs.setPostBuildStep "${TI_PDK_INSTALL_DIR}/packages/pdkAppImageCreate.bat ${TI_PDK_INSTALL_DIR}/packages ${CG_TOOL_ROOT} ${PROJECT_LOC}/${ConfigName} ${ProjName} %SOC% %PROCESSOR%"\r
773 \r
774 echo Copying macros.ini\r
775 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI\macros.ini\r
776 \r
777 popd\r
778 )\r
779 \r
780 )\r
781 \r
782 REM Setting linker option for arm projects\r
783 if %SOC% == OMAPL137 (\r
784 set LINKER_OPT=""\r
785 set COMPILER_OPT=""\r
786 set COMPILER=%CGT_VERSION_ARM9%\r
787 ) else if %SOC% == OMAPL138 (\r
788 set LINKER_OPT=""\r
789 set COMPILER_OPT=""\r
790 set COMPILER=%CGT_VERSION_ARM9%\r
791 ) else if %SOC% == am65xx (\r
792 set LINKER_OPT=""\r
793 set COMPILER_OPT=""\r
794 set COMPILER=%CGT_VERSION_ARM_A53%\r
795 ) else (\r
796 set LINKER_OPT="-L${BIOS_CG_ROOT}/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard --specs=nano.specs"\r
797 set COMPILER_OPT="-I${CG_TOOL_ROOT}/arm-none-eabi/include/newlib-nano "\r
798 set COMPILER=%CGT_VERSION_ARM%\r
799 )\r
800 \r
801 set arm_or_mpu="F"\r
802 if %PROCESSOR% == arm set arm_or_mpu="T"\r
803 if %PROCESSOR% == mpu set arm_or_mpu="T"\r
804 \r
805 if %arm_or_mpu% == "T" (\r
806 REM Search for all the arm test Project Files in the PDK.\r
807 for /F %%I IN ('dir /b /s *%MODULE%*%BOARD%*%PROCESSOR%*%PROJECT_TYPE%*roject.txt %AMIC110BOARD%') do (\r
808 set project_detected=1\r
809 \r
810 echo Detected Test Project: %%~nI\r
811 \r
812 REM Goto each directory where the test project file is located and create the projects.\r
813 pushd %%~dI%%~pI\r
814 \r
815 REM Expands the projectname variable which is used for identifying the baremetal and SYSBIOS project.\r
816 set projectName=%%~nI\r
817 REM Run CCS create command specific to baremetal and OS projects\r
818 if "x!projectName:nonOS=!" == "x!projectName!" (\r
819 REM Execute the command to create the OS project using the parameters specified above.\r
820 %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.cmd "" -ccs.name %%~nI -ccs.outputFormat %OUTPUT_FORMAT% -ccs.setCompilerOptions %COMPILER_OPT% -ccs.setCompilerOptions "-DUSE_BIOS" -ccs.setLinkerOptions %LINKER_OPT% -ccs.device %CCS_DEVICE% -ccs.endianness %ENDIAN% -ccs.kind executable -ccs.cgtVersion "%COMPILER%" -rtsc.xdcVersion %XDC_VERSION% -rtsc.enableDspBios -rtsc.biosVersion %BIOS_VERSION% -rtsc.buildProfile "debug" -rtsc.products "%RTSC_PRODUCTS%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a libgcc.a libuart.a libm.a libnosys.a -ccs.args %%~nI%%~xI %SIMULATOR_SUPPORT_DEFINE% -ccs.overwrite full -ccs.setPostBuildStep "${TI_PDK_INSTALL_DIR}/packages/pdkAppImageCreate.bat ${TI_PDK_INSTALL_DIR}/packages ${CG_TOOL_ROOT} ${PROJECT_LOC}/${ConfigName} ${ProjName} %SOC% %PROCESSOR%"\r
821 ) else (\r
822 REM Execute the command to create the baremetal project using the parameters specified above.\r
823 %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.cmd "" -ccs.name %%~nI -ccs.outputFormat %OUTPUT_FORMAT% -ccs.device %CCS_DEVICE% -ccs.endianness %ENDIAN% -ccs.outputType executable -ccs.cgtVersion "%CGT_VERSION_ARM%" -ccs.args %%~nI%%~xI -ccs.overwrite full -ccs.setPostBuildStep "$(CG_TOOL_ROOT)/bin/arm-none-eabi-objcopy -O binary "%%~nI.out" "%%~nI.bin"\r
824 \r
825 REM Deletes the startup file generated defaultly by CCS tool\r
826 del /q %MY_WORKSPACE%\%%~nI\*.S\r
827 )\r
828 \r
829 echo Copying macro.ini\r
830 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI\macros.ini\r
831 \r
832 popd\r
833 )\r
834 )\r
835 \r
836 set m4_or_mcu="F"\r
837 if %PROCESSOR% == m4 set m4_or_mcu="T"\r
838 if %PROCESSOR% == mcu set m4_or_mcu="T"\r
839 \r
840 if %m4_or_mcu% == "T" (\r
841 REM Search for all the m4 test Project Files in the PDK.\r
842 for /F %%I IN ('dir /b /s *%MODULE%*%BOARD%*%PROCESSOR%*%PROJECT_TYPE%*roject.txt') do (\r
843 set project_detected=1\r
844 \r
845 echo Detected Test Project: %%~nI\r
846 \r
847 REM Goto each directory where the test project file is located and create the projects.\r
848 pushd %%~dI%%~pI\r
849 \r
850 REM Execute the command to create the project using the parameters specified above.\r
851 %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.cmd "" -ccs.name %%~nI -ccs.outputFormat %OUTPUT_FORMAT% -ccs.setCompilerOptions "-DUSE_BIOS" -ccs.device %CCS_DEVICE% -ccs.endianness %ENDIAN% -ccs.kind executable -ccs.cgtVersion "%CGT_M4_VERSION%" -rtsc.xdcVersion %XDC_VERSION% -rtsc.enableDspBios -rtsc.biosVersion %BIOS_VERSION% -rtsc.buildProfile "debug" -rtsc.products "%RTSC_PRODUCTS%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a libgcc.a libuart.a libm.a libnosys.a -ccs.args %%~nI%%~xI %SIMULATOR_SUPPORT_DEFINE% -ccs.overwrite full -ccs.setPostBuildStep "${TI_PDK_INSTALL_DIR}/packages/pdkAppImageCreate.bat ${TI_PDK_INSTALL_DIR}/packages ${CG_TOOL_ROOT} ${PROJECT_LOC}/${ConfigName} ${ProjName} %SOC% %PROCESSOR%"\r
852 \r
853 echo Copying macro.ini\r
854 copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI\macros.ini\r
855 \r
856 popd\r
857 )\r
858 )\r
859 \r
860 popd\r
861 \r
862 if not defined project_detected (\r
863 echo No projects detected\r
864 )\r
865 \r
866 echo Project generation complete\r
867 echo *****************************************************************************\r
868 \r
869 :ENDSCRIPT\r
870 endlocal\r