This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Building example projects in PDK of MCSDK using CCS

Other Parts Discussed in Thread: TCI6638K2K

Hi,

We are trying to run some example tests on TCI6638K2K EVM. But we are unable to build the example projects present in the PDK. Can soke point to the correct method of building the example projects.

Also will be grateful if some one can answer the below post.

http://e2e.ti.com/support/embedded/bios/f/355/t/285524.aspx

Regards

Pradeep

  • Hi,

    I am following the above guide to build the PDK.

    The pdkbuilder.bat gets stuck while building AIF2, when i stop the build i get an error as depicted in the attached image. I am also attaching the image of the MCSDK packages present also the pdksetenv.bat ans pdkbui;der.bat

    Please tell how to resolve the error

    @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
    

    @REM ******************************************************************************
    @REM * FILE PURPOSE: Environment Setup for building PDK
    @REM ******************************************************************************
    @REM * FILE NAME: pdksetupenv.bat
    @REM *
    @REM * DESCRIPTION: 
    @REM *  Configures and sets up the Build Environment for PDK. 
    @REM *
    @REM *  The batch file expects an optional argument:PDK_INSTALL_PATH: Location of the PDK package.
    @REM *   If the argument is not specified the  batch file assumes that the PDK is installed in the same location 
    @REM *   where the batch file is located and is being executed.
    @REM *
    @REM * USAGE:
    @REM *  pdksetupenv.bat "C:/Program Files/Texas Instruments/pdk_keystone2_1_0_0_4/packages" 
    @REM *      --- OR ---
    @REM *  pdksetupenv.bat
    @REM *
    @REM * Copyright (C) 2012, Texas Instruments, Inc.
    @REM *****************************************************************************
    @echo off
    @REM *******************************************************************************
    @REM ********************** GET PARAMETERS PASSED THROUGH ARGUMENT   ***************
    @REM *******************************************************************************
    @REM Parameter Validation: Check if the argument was passed to the batch file and
    @REM if so we use that else we default to the working directory where the batch 
    @REM file was invoked from
    
    IF DEFINED PDK_INSTALL_PATH  GOTO endparameter
    set tempVar=%1
    IF NOT DEFINED tempVar GOTO noparameter
    set PDK_INSTALL_PATH=%~fs1
    goto done1
    :noparameter
    set PDK_INSTALL_PATH=%~sdp0
    :done1
    
    :endparameter
    set PDK_INSTALL_PATH=%PDK_INSTALL_PATH:\=/%
    
    @REM *******************************************************************************
    @REM ********************** CHECK REQUIRED ENVIRONMENT DEFINES BEGIN ***************
    @REM *******************************************************************************
    if not defined C6X_GEN_INSTALL_PATH      goto HLP_C6X_GEN_INSTALL_PATH
    set C6X_GEN_INSTALL_PATH=%C6X_GEN_INSTALL_PATH:\=/%
    
    if not defined EDMA3LLD_BIOS6_INSTALLDIR    goto HLP_EDMA3LLD_BIOS6_INSTALLDIR
    set EDMA3LLD_BIOS6_INSTALLDIR=%EDMA3LLD_BIOS6_INSTALLDIR:\=/%
    
    if not defined XDC_INSTALL_PATH  @echo "XDC_INSTALL_PATH: XDC NOT CONFIGURED!!!!. REQUIRED FOR XDC BUILD"
    
    if not defined CG_XML_BIN_INSTALL_PATH   @echo "CG_XML_BIN_INSTALL_PATH: CG XML NOT CONFIGURED!!!!. REQUIRED FOR XDC BUILD"
    
    
    @REM *******************************************************************************
    @REM ********************** CHECK REQUIRED ENVIRONMENT DEFINES END ***************
    @REM *******************************************************************************
    
    
    @REM *******************************************************************************
    @REM *************************** OPTIONAL ENVIRONMENT DEFINES **********************
    @REM *************************** NOT REQUIRED FOR BUILDING THE PDK *****************
    @REM *******************************************************************************
    @REM STATIC_ANALYZE_PATH: Environment Variable for tool to do STATIC Analysis 
    @REM                      of the code
    @REM 
    @REM DOXYGEN_INSTALL_PATH: DOXYGEN Version 1.7.3 [Only needed for generating Doxygen]
    @REM 
    @REM HTML_HELP_WORKSHOP_INSTALL_PATH: HTML Help compiler.[Only needed for generating Doxygen]
    @REM 
    @REM PDSP_CGEN_INSTALL_PATH: PDSP CGEN TOOLS [Only needed for PA firmware]
    @REM *******************************************************************************
    @REM *******************************************************************************
    @REM *******************************************************************************
    
    @REM PDK PARTNO
    set PARTNO=keystone2
    set SOC_FAMILY=KeyStone2
    
    set CGTOOLS=%C6X_GEN_INSTALL_PATH%
    
    @REM *******************************************************************************
    @REM ** Convert C6X_GEN_INSTALL_PATH and PDK_INSTALL_PATH to short name and to UNIX STYLE PATH  for XDC build **
    @REM *******************************************************************************
    if not defined XDC_INSTALL_PATH goto END_SHORT_CONVERSION
    set PATH=%PATH%;%XDC_INSTALL_PATH%\packages\xdc\services\io\release
    
    @REM *******************************************************************************
    @REM This file requires path2dos.exe utility available from XDC tools. If path2dos.exe 
    @REM is not available in the build environment then short names for paths SHOULD be 
    @REM provided to environment variables e.g. C:\PROGRA~1\TEXASI~1\PDK_TC~4\packages. 
    @REM In Windows environment, "dir /x" and "dir /-n" displays the short names generated 
    @REM for non-8dot3 file and directory names.
    @REM *******************************************************************************
    
    @REM for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %PDK_INSTALL_PATH%') do set PDK_INSTALL_PATH=%%a
    @REM for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %C6X_GEN_INSTALL_PATH%') do set C6X_GEN_INSTALL_PATH=%%a
    @REM for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %EDMA3LLD_BIOS6_INSTALLDIR%') do set EDMA3LLD_BIOS6_INSTALLDIR=%%a
    
    for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %PDK_INSTALL_PATH%') do set PDK_INSTALL_PATH=%%a
    
    for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %C6X_GEN_INSTALL_PATH%') do set C6X_GEN_INSTALL_PATH=%%a
    
    for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %EDMA3LLD_BIOS6_INSTALLDIR%') do set EDMA3LLD_BIOS6_INSTALLDIR=%%a
    
    :END_SHORT_CONVERSION
    if not defined C6X_GEN_INSTALL_PATH   set C6X_GEN_INSTALL_PATH=%C6X_GEN_INSTALL_PATH:\=/%
    if not defined EDMA3LLD_BIOS6_INSTALLDIR   set EDMA3LLD_BIOS6_INSTALLDIR=%EDMA3LLD_BIOS6_INSTALLDIR:\=/%
    
    set XDCCGROOT=%C6X_GEN_INSTALL_PATH%
    echo CGTOOL INSTALL Directory %C6X_GEN_INSTALL_PATH%
    echo PDK Directory %PDK_INSTALL_PATH%
    echo EDMA3 BIOS6 Directory %EDMA3LLD_BIOS6_INSTALLDIR%
    
    @echo off
    @REM *******************************************************************************
    @REM *************************** XDC PATH Configuration ****************************
    @REM *******************************************************************************
    
    @REM Ensure that all the components inside PDK are a part of the XDC Path; such that
    @REM one component can use another.
    set XDCPATH=../../..;%XDC_INSTALL_PATH%/packages;%PDK_INSTALL_PATH%/.;%C6X_GEN_INSTALL_PATH%/include
    set XDCPATH=%XDCPATH%;%EDMA3LLD_BIOS6_INSTALLDIR%/packages
    
    @REM Eclipse Help Plugin (Not required by customers)
    if defined XDC_ECLIPSE_PLUGIN_INSTALL_PATH set XDCPATH=%XDCPATH%;%XDC_ECLIPSE_PLUGIN_INSTALL_PATH%/.
    
    if defined XDC_FILTER_INSTALL_PATH set XDCPATH=%XDCPATH%;%XDC_FILTER_INSTALL_PATH%/.
    
    @REM *******************************************************************************
    @REM ************************** Build Tools Configuration **************************
    @REM *******************************************************************************
    
    @REM Windows Path
    set PATH=C:\Windows\System32
    
    @REM XDC Tools location:
    set PATH=%PATH%;%XDC_INSTALL_PATH%;%XDC_INSTALL_PATH%\bin
    
    @REM Compiler Tools: 
    set PATH=%PATH%;%C6X_GEN_INSTALL_PATH%\bin
    
    @REM CG-XML Package:
    set PATH=%PATH%;%CG_XML_BIN_INSTALL_PATH%
    
    @REM Third Party Tools: Doxygen
    if defined DOXYGEN_INSTALL_PATH  set PATH=%PATH%;%DOXYGEN_INSTALL_PATH%
    
    @REM Third Party Tools: HTML Help compiler.
    if defined HTML_HELP_WORKSHOP_INSTALL_PATH  set PATH=%PATH%;%HTML_HELP_WORKSHOP_INSTALL_PATH%;
    
    @REM Third Party Tools: Install-Jammer (Not required by customers)
    if defined INSTALL_JAMMER_DIR set PATH=%PATH%;%INSTALL_JAMMER_DIR%
    
    @REM Third Party Tools: Coverity 
    if defined STATIC_ANALYZE_PATH set PATH=%PATH%;%STATIC_ANALYZE_PATH%\bin
    
    @REM PDSP CGEN TOOL for PA firmware building
    if defined PDSP_CGEN_INSTALL_PATH set PATH=%PATH%;%PDSP_CGEN_INSTALL_PATH%;
    
    @REM Set the Title Window appropiately.
    Title PDK Build Environment
    
    goto SUCCESS
    
    :HLP_C6X_GEN_INSTALL_PATH
    @echo "ENVIRONMENT VARIABLE C6X_GEN_INSTALL_PATH: Code Generation Tool NOT CONFIGURED!!!!"
    @echo Example [NOTE ""]:set C6X_GEN_INSTALL_PATH="c:/Program Files/Texas Instruments/ccsv5/C6000 Code Generation Tools 7.3.2"
    
    :HLP_EDMA3LLD_BIOS6_INSTALLDIR
    @echo "ENVIRONMENT VARIABLE EDMA3LLD_BIOS6_INSTALLDIR: EDMA3 BIOS6 Installation Path NOT CONFIGURED!!!!"
    @echo Example [NOTE ""]: set EDMA3LLD_BIOS6_INSTALLDIR="C:/Program Files/Texas Instruments/edma3_lld_02_11_03_02"
    
    goto ERROR
    
    :HLP_XDC_INSTALL_PATH
    @echo "ENVIRONMENT VARIABLE XDC_INSTALL_PATH: XDC NOT CONFIGURED!!!!"
    @echo XDC_INSTALL_PATH EXAMPLE [DEFAULT LOCATION]:
    @echo  set XDC_INSTALL_PATH=C:/Program Files/Texas Instruments/xdctools_3_22_04_46
    
    :HLP_CG_XML_BIN_INSTALL_PATH
    @echo "ENVIRONMENT VARIABLE CG_XML_BIN_INSTALL_PATH: Code Generation Tools XML package NOT CONFIGURED!!!!"
    @echo CG_XML_BIN_INSTALL_PATH EXAMPLE [DEFAULT LOCATION]:
    @echo  set CG_XML_BIN_INSTALL_PATH=C:/Program Files/Texas Instruments/cg_xml/bin
    
    goto ERROR
    
    :SUCCESS
    @echo PDK BUILD ENVIRONMENT CONFIGURED
    @echo *******************************************************************************
    goto DONE
    
    :ERROR
    @echo ERROR CONFIGURING PDK BUILD ENVIRONMENT
    @echo *******************************************************************************
    
    :DONE
    

    Regards

    Pradeep

  • Can you tell me what version of the MCSDK you have downloaded?  It looks like 3.0.0.11.  Am I correct?

  • Hi,

    Yes, it is 3.0.0.11

    Regards,

    Pradeep