]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/tcp3d-lld.git/blobdiff - projectCreate.bat
Merge pull request #1 in PROCESSOR-SDK/tcp3d-lld from PRSDK-2194 to master
[keystone-rtos/tcp3d-lld.git] / projectCreate.bat
index 561ad1714b66dbf8268829536b227cee8e170098..4f98601c593e2894eb6eefed7324041a61fb2adc 100755 (executable)
@@ -4,28 +4,71 @@
 @REM * FILE NAME: projectCreate.bat\r
 @REM *\r
 @REM * DESCRIPTION: \r
-@REM *  The script file is used to create the test and example projects for\r
-@REM *  TCP3D. These projects are available in the specified workspace.\r
+@REM *  The script file is used to create the test and example projects of TCP3D.\r
+@REM *  These projects are available in the specified workspace.\r
 @REM *\r
-@REM * USAGE:\r
-@REM *  projectCreate.bat big\r
-@REM *      --- OR ---\r
-@REM *  projectCreate.bat\r
+@REM * Syntax:\r
+@REM *  projectCreate.bat [deviceName] [endian]\r
 @REM *\r
-@REM * DEPENDENCIES:\r
-@REM *  "C:\Program Files\Texas Instruments\pdk_C6657_1_0_0_1001\packages"\r
+@REM * Description:     (first option is default)\r
+@REM *  deviceName  -   k2k / k2h / k2l\r
+@REM *  endian      -   little / big\r
 @REM *\r
-@REM * Copyright (C) 2011, Texas Instruments, Inc.\r
+@REM * Example:\r
+@REM *  a) projectCreate.bat\r
+@REM *              - Creates all module projects for k2h device for little endian\r
+@REM *  b) projectCreate.bat k2h\r
+@REM *              - Creates all module projects for k2h device for little endian\r
+@REM *  c) projectCreate.bat k2k big\r
+@REM *              - Creates all module projects for k2k device for big endian\r
+@REM *\r
+@REM * Copyright (C) 2012, Texas Instruments, Inc.\r
 @REM *****************************************************************************\r
 @echo OFF\r
 \r
-REM skip checking as done for PDK\r
-REM @call setupenv.bat\r
-\r
+REM Parameter Validation: Check if the argument was passed to the batch file.\r
 REM *****************************************************************************\r
+REM Argument [deviceName] is used to set DEVICE_NAME variable.\r
+REM Valid values are 'k2k', 'k2h', 'k2l'. Defaults to 'k2h'.\r
+set tempVar1=%1\r
+if not defined tempVar1 goto nodevice\r
+set DEVICE_NAME=%tempVar1%\r
+goto devicedone\r
+:nodevice\r
+set DEVICE_NAME=k2h\r
+:devicedone\r
+\r
+REM Argument [endian] is used to set ENDIAN variable.\r
+REM This is Endianess of the Projects being created.\r
+REM Valid Values are 'little' and 'big'. Defaults to 'little'.\r
+set tempVar2=%2\r
+if not defined tempVar2 goto littleendian\r
+if %tempVar2% == big (\r
+set ENDIAN=big\r
+goto endiandone\r
+) \r
+:littleendian\r
+set ENDIAN=little\r
+:endiandone\r
+\r
+REM This is specific module for which Projects are created.\r
+set MODULE=tcp3d\r
+\r
+REM Batch file execution location\r
+set WORKDIR_SHORT=%~sdp0\r
+\r
 REM *****************************************************************************\r
-REM                         Customer Modifiable Section\r
+\r
+echo =========================================================================\r
+echo.   DEVICE_NAME     :   %DEVICE_NAME%\r
+echo.   ENDIAN          :   %ENDIAN%\r
+echo.   MODULE          :   %MODULE%\r
+echo.   WORKDIR_SHORT   :   %WORKDIR_SHORT%\r
+echo =========================================================================\r
+\r
 REM *****************************************************************************\r
+REM * Version Information of the various tools etc required to build the test\r
+REM * projects. Customers are free to modify these to meet their requirements.\r
 REM *****************************************************************************\r
 \r
 REM This is to control the CCS version specific project create command\r
@@ -35,45 +78,53 @@ set IS_CCS_VERSION_4=no
 REM Set to 'no' when using QT, EVM, VDB, or other hardware. Set to 'yes' only when using the simulator.\r
 set IS_SIMULATOR_SUPPORT_NEEDED=yes\r
 \r
-REM Install Location for CCS. Ensure the PATH here is in compliance with the 'IS_CCS_VERSION_4' variable\r
-REM defined above.\r
-set CCS_INSTALL_PATH=c:\ti\ccsv5\r
+REM Install Location for CCS\r
+set CCS_INSTALL_PATH="C:\ti\ccsv5"\r
 \r
 REM Workspace where the projects will be created in "example" and "test" folders.\r
 set MY_WORKSPACE=.\r
 \r
-REM This is Endianess of the Projects being created.\r
-REM Valid Values are 'little' and 'big'\r
-if "%1" == "big" (\r
-set ENDIAN=big\r
-) else (\r
-set ENDIAN=little\r
-)\r
+REM macros.ini location\r
+set MACROS_FILE=%WORKDIR_SHORT%test\macros.ini\r
 \r
 REM This is the format of the executable being created\r
 REM Valid Values are 'ELF' and 'COFF'\r
 set OUTPUT_FORMAT=ELF\r
 \r
 REM Version of CG-Tools\r
-set CGT_VERSION=7.3.1\r
+set CGT_VERSION=7.4.4\r
 \r
 REM Version of XDC\r
-set XDC_VERSION=3.23.03.53\r
+set XDC_VERSION=3.25.05.94\r
 \r
 REM Version of BIOS\r
-set BIOS_VERSION=6.33.05.46\r
+set BIOS_VERSION=6.37.00.20\r
 \r
 REM Version of the IPC\r
-set IPC_VERSION=1.24.02.27\r
-\r
-REM Version of the PDK\r
-set PDK_VERSION=1.00.00.1003\r
+set IPC_VERSION=3.22.00.04\r
 \r
-REM Version of the EDMA\r
-set EDMA_VERSION=02.11.05\r
+REM EDMA3 Version\r
+set EDMA_VERSION=02.11.11.15\r
 \r
-REM RTSC Platform Name\r
+REM Version of the PDK\r
+set PDK_VERSION=3.01.00.01\r
+\r
+REM PDK Part Number & Platform name\r
+if %DEVICE_NAME% == k2k (\r
+set PDK_PARTNO=TCI6638\r
+set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6638K2K\r
+) else if  %DEVICE_NAME% == k2h (\r
+set PDK_PARTNO=TCI6636\r
+set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6636K2H\r
+) else if  %DEVICE_NAME% == k2l (\r
+set PDK_PARTNO=TCI6630\r
+set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6630K2L\r
+REM Temporarily using simKepler \r
+REM set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
+) else (\r
+set PDK_PARTNO=TCI6634\r
 set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
+)\r
 \r
 REM RTSC Target \r
 REM - Please ensure that you select this taking into account the\r
@@ -90,9 +141,6 @@ REM                 Please do NOT change anything below this
 REM *****************************************************************************\r
 REM *****************************************************************************\r
 \r
-REM Batch file execution location\r
-set WORKDIR_SHORT=%~sdp0\r
-\r
 REM Set auto create command by default for use with CCSv5\r
 set AUTO_CREATE_COMMAND=eclipse\eclipsec -noSplash \r
 \r
@@ -106,45 +154,41 @@ REM If simulator support is needed then set the define
 If .%IS_SIMULATOR_SUPPORT_NEEDED% == .yes set SIMULATOR_SUPPORT_DEFINE=-ccs.setCompilerOptions "--define SIMULATOR_SUPPORT"\r
 \r
 echo *****************************************************************************\r
-echo Detecting UnitTest Projects in PDK and importing them in the workspace %MY_WORKSPACE%\r
+echo Detecting UnitTest Projects in TCP3D and importing them in the workspace %MY_WORKSPACE%\r
 \r
-set listFile=testpjtlist.txt\r
-dir /b /s *testproject.txt | findstr "tcp3" > %listFile%\r
-REM Search for all the test Project Files in the PDK.\r
-for /F %%I IN (%listFile%) do (\r
+REM Search for all the test Project Files in the TCP3D.\r
+for /F %%I IN ('dir /b /s *%DEVICE_NAME%*testproject.txt') do (\r
 echo Detected Test Project: %%~nI\r
 \r
 REM Goto each directory where the test project file is located and create the projects.\r
 pushd test\r
 \r
 REM Execute the command to create the project using the parameters specified above.\r
-%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
+%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
 \r
 REM copy the macros.ini to project location\r
-copy %WORKDIR_SHORT%test\macros.ini %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
+echo Copying macro.ini\r
+copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
 \r
 popd\r
 )\r
-@del /q %listFile%\r
 \r
 echo *****************************************************************************\r
-echo Detecting Example Projects in PDK and importing them in the workspace %MY_WORKSPACE%\r
+echo Detecting Example Projects in TCP3D and importing them in the workspace %MY_WORKSPACE%\r
 \r
-set listFile=examplepjtlist.txt\r
-dir /b /s *exampleproject.txt | findstr "tcp3" > %listFile%\r
-REM Search for all the Example Project Files in the PDK.\r
-for /F %%I IN (%listFile%) do (\r
+REM Search for all the Example Project Files in the TCP3D.\r
+for /F %%I IN ('dir /b /s *%DEVICE_NAME%*exampleproject.txt') do (\r
 echo Detected Example Project: %%~nI\r
 \r
 REM Goto each directory where the example project file is located and create the projects.\r
 pushd example\r
 \r
 REM Execute the command to create the project using the parameters specified above.\r
-%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
+%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
 \r
 REM copy the macros.ini to project location\r
-copy %WORKDIR_SHORT%test\macros.ini %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
+echo Copying macro.ini\r
+copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI_%ENDIAN%\macros.ini\r
 \r
 popd\r
 )\r
-@del /q %listFile%\r