NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

MCSDK UG Chapter Developing PDK

From Texas Instruments Wiki
Jump to: navigation, search




TI Logo oneline twocolor.png



Developing with MCSDK: Platform Development Kit and Peripherals

Last updated: 02/11/2015


Acronyms[edit]

The following acronyms are used throughout this chapter.

Acronym Meaning
CSL Texas Instruments Chip Support Library
DSP Digital Signal Processor
EDMA Enhanced Direct Memory Access
MCSDK Texas Instruments Multi-Core Software Development Kit
PDK Texas Instruments Programmers Development Kit
SRIO Serial Rapid IO
TI Texas Instruments

CSL/LLD User Guide[edit]

Overview[edit]

This document provides guideline for compiling and executing Low Level Device Driver (LLD) with examples included in the release package. As a pre-requisite refer release note for PDK in order to find recommended version of compiler and dependent tools. LLD would need to be installed by running the installer part of PDK. For rest of the document keyword

  • <PDK_INSTALL_PATH> refers to the location where PDK is installed.
  • <lld> refers to individual LLDs in PDK package

Build guidelines for Full PDK package for C66x Target[edit]

    Release package comes with a pre-built set of libraries for individual LLD’s and CSL modules. Below are the steps in case if an LLD would need to be rebuilt. Note that makefile support is now added so that LLDs and CSL libraries can be built using makefiles.

    Building PDK using gmake in Windows environment[edit]

    1. Setting Environment Variables by editing the <PDK_INSTALL_PATH>\packages>pdksetupenv.bat to reflect your installation (E.g.):
      set C6X_GEN_INSTALL_PATH="C:/ti_5_5/ccsv5/tools/compiler/c6000_7.4.7"
      set EDMA3LLD_BIOS6_INSTALLDIR="C:/ti/edma3_lld_02_11_13_17"
      set PDK_INSTALL_PATH=C:/ti/pdk_keystone2_3_01_00_03/packages
      set BIOS_INSTALL_PATH=C:/ti/bios_6_37_03_30
      set XDC_INSTALL_PATH=C:/ti/xdctools_3_25_06_96
      set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
      
    2. Run pdksetupenv.bat to setup the build enviornment and to check in case if any modifications are required for the target environment.
      pdksetupenv.bat
      

      NoteNote: The pdksetupenv.bat requires path2dos.exe utility available from XDC tools. If path2dos.exe is not available in the build environment then short names for paths SHOULD be provided to environment variables e.g. C:\PROGRA~1\TEXASI~1\PDK_TC~4\packages. In Windows environment, "dir /x" and "dir /-n" displays the short names generated for non-8dot3 file and directory names.

    3. To build all the PDK components, execute pdkbuilder.bat from the top level PDK packages directory <PDK_INSTALL_PATH>\packages directory
      pdkbuilder.bat
      
    4. The batch file cleans and rebuilds all components which are part of the PDK release.

    Building PDK using gmake in MSYS environment[edit]

    1. Setting Environment Variables
      • C6X_GEN_INSTALL_PATH
        • Install location for Code Gen Tool
        • Examples for default location of Code Gen Tool 7.2.2 GA
      set C6X_GEN_INSTALL_PATH="C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.2.2"
      
      • PDK_INSTALL_PATH
        • Install location for PDK package
        • Change the shell prompt directory to PDK installation directory. Example for a default PDK installation at C:/Program Files/Texas Instruments/pdk_TCI6608_1_0_0_10/packages, the commands would be
      $cd "C:/Program Files/Texas Instruments/pdk_TCI6608_1_0_0_10/packages"
      $export PDK_INSTALL_PATH=$PWD
      
      • Additional environment variables are optional and not required on this environment. Refer pdksetupenv.bat or pdksetupenv.sh for the details.
    2. To build all the PDK components, run pdkbuilder.sh from the top level PDK packages directory <PDK_INSTALL_PATH>/packages directory.
      $./pdkbuilder.sh
      

      The shell script cleans and rebuilds all components which are part of the PDK release.

    Build guidelines for ARM User Mode LLDs[edit]

      ARM User Mode support is available for following PDK components:
      • CPPI
      • RM
      • QMSS
      • PA
      • SA
      • NWAL
      • PKLIB
      NoteNote: In Linux user mode environment all components are supports multi thread in one process environment. CPPI/QMSS LLDs supports multi process use case with resources being allocated through RM LLD.

      Building user mode LLD examples and libraries with Linux devkit[edit]

      This step is applicable to LLDs supported for ARM target. Check the PDK release notes for the list of supported LLDs.

      • Pre-requisites:

      - Linaro ARM tool chain version as mentioned in MCSDK release notes is available in Linux host.
      - Linux Devkit installed from MCSDK releases into a directory with write permission. Please note that the document would refer linux devkit location as <LINUX_DEVKIT_INSTALL_PATH>

      • Change directory to <PDK_INSTALL_PATH>/packages
      • Modify armv7setupenv.sh script based on host build environment. See below environment variables
      # Update the below environment variable to the Linux Devkit Path
      export LINUX_DEVKIT_INSTALL_PATH=$HOME/linux-devkit/sysroots/cortexa15hf-vfp-neon-3.8-oe-linux-gnueabi
      # Export CORE type
      export CORE=armv7
      # Export Device
      export DEVICE=k2h
      # ARM cross tool executable path to MCSDK published tool chain (Below is an example).
      export CROSS_TOOL_INSTALL_PATH=/opt/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin
      echo "CROSS_TOOL_INSTALL_PATH set to $CROSS_TOOL_INSTALL_PATH"
      # ARM cross tool prefix
      export CROSS_TOOL_PRFX=arm-none-linux-gnueabihf-
      
      # Default Output directory for generated binaries and objects
      export ARMV7LIBDIR=$PWD/../lib/armv7
      #Modify to Linux Dev Kit Lib Path as below
      if [ ! -z "$LINUX_DEVKIT_INSTALL_PATH" ]; then
      #Modify the location here if the intent is not to get the libraries under linux devkit, otherwise no modications needed
      export ARMV7LIBDIR=$LINUX_DEVKIT_INSTALL_PATH/usr/lib
      fi
      
      • Execute the script in target shell environment by executing
        source armv7setupenv.sh
      • Run make all to build all executables and libraries
      • In the case of building subset of targets take a look at the makefile being provided to go through targets supported. Following are the options
      Building only libraries 

      make lib
      Output libraries will be available at $ARMV7LIBDIR location

      Building only tests

      make tests
      Output test binaries will be available at $ARMV7BINDIR location

      Building only examples

      make examples
      Output example binaries will be available at $ARMV7BINDIR location and Temporary object files will be available at $ARMV7OBJDIR location

      NoteNote: Please note that the user would need write permissions to the locations as specified by $ARMV7LIBDIR.

      Building user mode LLD examples and libraries with NO Linux devkit (Not a standard practice and not supported starting with MCSDK 3.0.4) [edit]

      This step is applicable to LLDs supported for ARM target. Check the PDK release notes for the list of supported LLDs.

      • Pre-requisite:
        • Linaro ARM tool chain version as mentioned in MCSDK release notes is available in Linux host.
        • IPC libraries are rebuilt with same ARM cross tool version as MCSDK provided one.
        • HPLIB and SA library to be built with the same Linaro ARM tool chain as MCSDK provided one

      NoteNote: Please refer to <ipc_install>/docs/IPC_Install_Guide for details on rebuilding the IPC libraries.

      • Change directory to <PDK_INSTALL_PATH>/packages
      • Modify armv7setupenv.sh script based on host build environment. See below environment variables
      # Make sure below environment is unset for building without LINUX DEVKIT
      export LINUX_DEVKIT_INSTALL_PATH=
      # Provide the HPLIB INSTALL PATH
      export HPLIB_INSTALL_PATH=$HOME/ti/transport_net_lib_1_0_0_6/packages
      # Provide the SA LLD install PATH
      export SA_INSTALL_PATH=$HOME/ti/mcsdk_3_00_00_11/salld_keystone2_02_00_00_06/packages
      
      #SA LLD Library path
      # Modify to match the actual armv7 sa lld library build path
      export ARMV7SALIBDIR=$SA_INSTALL_PATH/ti/drv/sa/lib/armv7
      
      # HPLIB library path
      # Modify to match the actual armv7 sa lld library build path
      export ARMV7HPLIBDIR=$HPLIB_INSTALL_PATH/ti/runtime/hplib/lib/armv7
      
      # Update the IPC library paths - please note that this is the path after IPC libraries and include files are installed in one common folder
      export IPC_DEVKIT_INSTALL_PATH=$HOME/ipc_install_path
      
      
      # Default Output directory for generated binaries and objects, modify for any other locations
      export ARMV7LIBDIR=$PWD/../lib/armv7
      #Modify to Linux Dev Kit Lib Path
      if [ ! -z "$LINUX_DEVKIT_INSTALL_PATH" ]; then
      export ARMV7LIBDIR=$LINUX_DEVKIT_INSTALL_PATH/usr/lib
      fi
      
      • Execute the script in target shell environment by executing
        source armv7setupenv.sh
      • Run make all to build all executables and libraries
      • In the case of building subset of targets take a look at the makefile being provided to go through targets supported. Following are the options
      Building only libraries 

      make lib
      Output libraries will be available at $ARMV7LIBDIR location

      Building only tests

      make tests
      Output test binaries will be available at $ARMV7BINDIR location

      Building only examples

      make examples
      Output example binaries will be available at $ARMV7BINDIR location and Temporary object files will be available at $ARMV7OBJDIR location


      NoteNote: Please note that the user would need write permissions to the locations as specified by $ARMV7LIBDIR.

      Steps to run example and/or unit test projects on C66x Target[edit]

        The example directory in individual LLD contains several examples which demonstrate usage of API’s. The “test” directory in some LLD contains unit test module.
      1. Check Prerequisites
        Please ensure that all dependent/pre-requisite packages are installed before proceeding with the examples and/or unit test.
      2. Configure CCS Environment
        The CCS environment configuration step needs to be done only once for a workspace as these settings are saved in the workspace preferences. These settings only need to be modified if:
        • New workspace is selected
        • Newer version of the component is being used. In that case modify the paths of the upgraded component to the newer directory.
        The procedure mentioned in this section is provided using <Managed Build Macro> option in CCS. Following are the steps:
        1. Create a macro file if not available from the PDK release. For the PDK release file: <PDK_INSTALL_PATH>\packages\macros_ini can be used
        Following environment would need to be available in the macros.ini file
        PDK_INSTALL_PATH = <PDK_INSTALL_PATH>\packages
        CSL_INSTALL_PATH = <PDK_INSTALL_PATH>\packages
        CPPI_INSTALL_PATH = <PDK_INSTALL_PATH>\packages
        QMSS_INSTALL_PATH = <PDK_INSTALL_PATH>\packages
        SRIO_INSTALL_PATH = <PDK_INSTALL_PATH>\packages
        TCP3D_INSTALL_PATH = <PDK_INSTALL_PATH>\packages
        
        1. Open CCS and select an appropriate workspace
        2. Load Managed Build Macros by
        1. Click on File -> Import
        2. Click on Managed Build Macros
        3. Select the file macros.ini
        4. Click on “Overwrite existing values”
        5. Click Finish
      3. Create CCS Project
        PDK package includes a batch file pdkProjectCreate.bat under <PDK_INSTALL_PATH>\packages. The batch file allows creation of projects based on the different dependent tool version for all examples and unit tests included in PDK. The batch file also allows additional executable types eg: COFF/ELF and Endianess. Batch file is supported for both CCSv4.2 and CCSv5.x environment. Alternatively, projects can be created using the CCS wizard and importing required files from test and example directories. Additional details on using pdkProjectCreate.bat:
        • Prerequisite: All dependent components need to be installed. After the components are installed, start CCS once and wait for eclipse plugin to get into effect before running the batch file.
        • Modify environment variables in pdkProjectCreate.bat under "<PDK_INSTALL_PATH>\packages" directory to reflect project options. This would also include
          • IS_SIMULATOR_SUPPORT_NEEDED: For running projects in simulator environment
          • ENDIAN: To select "little" or "big" endian
          • Refer additional environment settings in the batch file
        Run the batch file: pdkProjectCreate.bat
        • The command line above will create projects for all PDK examples. In order to create projects for a single example, for instance the PA LLD example, the command line should be modified as follows:
        pdkProjectCreate.bat <PDK_INSTALL_PATH>\packages\ti\drv\pa\example\simpleExample. The CCS projects will be located under the directory selected for environment variable <MY_WORKSPACE> which by default points to C:\MyPDKWorkspace<PART_NUMBER>
      4. Import Project
        Below are the steps for importing project assumes that CCS project is already available.
        1. Select C/C++ Development perspective
        2. Click on File -> Import
        3. On the Import Dialog Box select CCS  Existing CCS/CCE Eclipse Project
        4. Click on Next
        5. This will pop up a new dialog box; ensure that 'Select Root Directory' option is selected
        6. Click on Browse and select the top level directory where the project is present. For example
                 C:\MyPDKWorkspace<PART_NUMBER>
                 
                <PART_NUMBER> reflects the device part number for the PDK being installed.
          
        7. Under the projects section you should see the project. For example
                qmInfraExampleProject
                
        8. Click Finish
      5. Build Project
        To build the project; ensure that the project you want to build, i.e., qmInfraExampleProject is set as the active project. Click on Project -> Build Active Project.
      6. Run Project
        • Launch the Debugger and switch to the Debug Perspective.
        • To execute the project ensure the following is done:
          • Click on Target -> Reset CPU
          • Click on Target -> Load Program
          • Select the executable file to be loaded. Example: C:\MyPDKWorkspace<PART_NUMBER>\qmInfraExampleProject\Debug\ qmInfraExampleProject.out
          • Click on OK.
          • Once the project is loaded; click on Target -> Run to execute it.

      Steps to run ARM user mode LLD example and/or unit test on Target[edit]

      • Execution of user mode examples and tests included in MCSDK by default requires root previlige. This is primarily dependency of devmem for mapping the device memory which by default is restricted to super user. The default mechanism is also to reduce exposure of device memory to any user not having admin privilege
      • Pre-requite for this step is to have built binaries as mentioned in previous sections.
      • Transfer the example/test binaries available under $ARMV7BINDIR directory to the file system using TFTP or NFS
      • Change the permission execute by running command chmod
      • Execute the binary

      How To's[edit]


E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK UG Chapter Developing PDK here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK UG Chapter Developing PDK here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article MCSDK UG Chapter Developing PDK here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article MCSDK UG Chapter Developing PDK here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article MCSDK UG Chapter Developing PDK here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK UG Chapter Developing PDK here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK UG Chapter Developing PDK here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article MCSDK UG Chapter Developing PDK here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article MCSDK UG Chapter Developing PDK here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity