@REM ****************************************************************************** @REM * FILE PURPOSE: PDK Unit Test and Example Project Creator @REM ****************************************************************************** @REM * FILE NAME: pdkProjectCreate.bat @REM * @REM * DESCRIPTION: @REM * The script file is used to create the test and example projects of all @REM * components under PDK. These projects are available in the specified @REM * workspace. @REM * @REM * Syntax: @REM * pdkProjectCreate.bat [deviceName] [endian] [module] [pdkDir] @REM * @REM * Description: (first option is default) @REM * deviceName - k2k / k2h @REM * endian - little / big @REM * module - bcp / tcp3d / qmss , etc @REM * pdkDir - THIS FILE LOCATION / "C:\ti\pdk_keystone2_1_00_00_09\packages" @REM * @REM * Example: @REM * a) pdkProjectCreate.bat @REM * - Creates all module projects for k2k device for little endian @REM * b) pdkProjectCreate.bat k2h @REM * - Creates all module projects for k2h device for little endian @REM * c) pdkProjectCreate.bat k2k big @REM * - Creates all module projects for k2k device for big endian @REM * d) pdkProjectCreate.bat k2k big qmss @REM * - Creates qmss projects for k2k device for big endian @REM * @REM * Copyright (C) 2012, Texas Instruments, Inc. @REM ***************************************************************************** @echo OFF REM Parameter Validation: Check if the argument was passed to the batch file. REM ***************************************************************************** REM Argument [deviceName] is used to set DEVICE_NAME variable. REM Valid values are 'k2k', 'k2h'. Defaults to 'k2k'. set tempVar1=%1 if not defined tempVar1 goto nodevice set DEVICE_NAME=%tempVar1% goto devicedone :nodevice set DEVICE_NAME=k2k :devicedone REM Argument [endian] is used to set ENDIAN variable. REM This is Endianess of the Projects being created. REM Valid Values are 'little' and 'big'. Defaults to 'little'. set tempVar2=%2 if not defined tempVar2 goto littleendian if %tempVar2% == big ( set ENDIAN=big goto endiandone ) :littleendian set ENDIAN=little :endiandone REM Argument [module] is used to set MODULE variable. REM This is specific module for which Projects are created. REM Valid Values are LLD name. Defaults to all LLD's. set tempVar3=%3 if not defined tempVar3 goto nomodule set MODULE=%tempVar3% goto moduledone :nomodule set MODULE=all :moduledone REM Argument [pdkDir] is used to set PDK_SHORT_NAME. This is PDK directory REM where project description files are located. If there is no value passed, REM it defaults to the file location directory. Then convert the variable to REM short name to avoid issues using batch file commands. set tempVar4=%4 if not defined tempVar4 goto noparameter set PDK_SHORT_NAME=%tempVar4% goto done :noparameter set PDK_SHORT_NAME=%~sdp0 :done REM ***************************************************************************** echo ========================================================================= echo. DEVICE_NAME : %DEVICE_NAME% echo. ENDIAN : %ENDIAN% echo. MODULE : %MODULE% echo. PDK_SHORT_NAME : %PDK_SHORT_NAME% echo ========================================================================= REM ***************************************************************************** REM * Version Information of the various tools etc required to build the test REM * projects. Customers are free to modify these to meet their requirements. REM ***************************************************************************** REM This is to control the CCS version specific project create command REM Set to 'no' when using CCSv5 or set to 'yes' when using CCSv4 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. set IS_SIMULATOR_SUPPORT_NEEDED=yes REM Install Location for CCS set CCS_INSTALL_PATH="C:\ti\ccsv5" REM Workspace where the PDK projects will be created. set MY_WORKSPACE=%PDK_SHORT_NAME%\MyExampleProjects REM macros.ini location set MACROS_FILE=%PDK_SHORT_NAME%\macros.ini REM This is the format of the executable being created REM Valid Values are 'ELF' and 'COFF' set OUTPUT_FORMAT=ELF REM Version of CG-Tools set CGT_VERSION=7.4.2 REM Version of XDC set XDC_VERSION=3.25.00.48 REM Version of BIOS set BIOS_VERSION=6.35.01.29 REM Version of the IPC set IPC_VERSION=3.00.00.16 REM Version of the SA LLD set SA_VERSION=2.0.0.6 REM EDMA3 Version set EDMA_VERSION=02.11.05 REM Version of the PDK set PDK_VERSION=1.00.00.11 REM PDK Part Number set PDK_PARTNO=TCI6634 REM RTSC Platform Name set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6638K2K REM RTSC Target REM - Please ensure that you select this taking into account the REM OUTPUT_FORMAT and the RTSC_PLATFORM_NAME if %ENDIAN% == big ( set RTSC_TARGET=ti.targets.elf.C66_big_endian ) else ( set RTSC_TARGET=ti.targets.elf.C66 ) REM ***************************************************************************** REM ***************************************************************************** REM Please do NOT change anything below this REM ***************************************************************************** REM ***************************************************************************** REM Set auto create command by default for use with CCSv5 set AUTO_CREATE_COMMAND=eclipse\eclipsec -noSplash REM If is CCS version 4 then set auto create command for use with CCSv4 If .%IS_CCS_VERSION_4% == .yes set AUTO_CREATE_COMMAND=eclipse\jre\bin\java -jar %CCS_INSTALL_PATH%\eclipse\startup.jar REM Set project for Silicon or QT by default set SIMULATOR_SUPPORT_DEFINE= 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" REM Goto the PDK Installation Path. if %MODULE% == all ( pushd %PDK_SHORT_NAME% ) else ( pushd %PDK_SHORT_NAME%\ti\drv\%MODULE% ) echo ***************************************************************************** echo Detecting UnitTest Projects in PDK and importing them in the workspace %MY_WORKSPACE% REM Search for all the test Project Files in the PDK. for /F %%I IN ('dir /b /s *%DEVICE_NAME%*testproject.txt') do ( echo Detected Test Project: %%~nI REM Goto each directory where the test project file is located and create the projects. pushd %%~dI%%~pI REM Execute the command to create the project using the parameters specified above. %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.name %%~nI -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.sdo.edma3:%EDMA_VERSION%;com.ti.rtsc.IPC:%IPC_VERSION%;com.ti.rtsc.SYSBIOS:%BIOS_VERSION%;ti.pdk:%PDK_VERSION%;ti.drv.sa:%SA_VERSION%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a -ccs.args %%~nI%%~xI %SIMULATOR_SUPPORT_DEFINE% echo Copying macro.ini copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI\macros.ini popd ) echo ***************************************************************************** echo Detecting Example Projects in PDK and importing them in the workspace %MY_WORKSPACE% REM Search for all the Example Project Files in the PDK. for /F %%I IN ('dir /b /s *%DEVICE_NAME%*exampleproject.txt') do ( echo Detected Example Project: %%~nI REM Goto each directory where the example project file is located and create the projects. pushd %%~dI%%~pI REM Execute the command to create the project using the parameters specified above. %CCS_INSTALL_PATH%\%AUTO_CREATE_COMMAND% -data %MY_WORKSPACE% -application com.ti.ccstudio.apps.projectCreate -ccs.name %%~nI -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.sdo.edma3:%EDMA_VERSION%;com.ti.rtsc.IPC:%IPC_VERSION%;com.ti.rtsc.SYSBIOS:%BIOS_VERSION%;ti.pdk:%PDK_VERSION%;ti.drv.sa:%SA_VERSION%" -rtsc.platform "%RTSC_PLATFORM_NAME%" -rtsc.target %RTSC_TARGET% -ccs.rts libc.a -ccs.args %%~nI%%~xI %SIMULATOR_SUPPORT_DEFINE% echo Copying macro.ini copy %MACROS_FILE% %MY_WORKSPACE%\%%~nI\macros.ini popd ) popd