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.

[FAQ] AM5728: Build and Test Guide for AM57xx Driver Examples using CCS

Part Number: AM5728

Tool/software:

Hi,
How can I build and test an AM57xx driver example Using CCS?

  • Hi,

    The FAQ contains Windows and Linux scripts used to create example CCS projects for all PDK sub-components. The following steps describe how to create CCS example project and run them on targets.
    1. Project Creation
    2. Project Build
    3. Run Program

    Prerequisites:
    Step 1:
    Windows: Update CCS version in pdkProjectCreate.bat file in case different CCS version is used.
    Path : <SDK Root>\pdk_[soc]_[version]\packages
    set CCS_INSTALL_PATH=C:\ti\ccs1271\ccs

    Linux : Update CCS version in pdkProjectCreate.sh file in case different CCS version is used.
    Path : <SDK Root>/pdk_[soc]_[version]/packages
    export CCS_INSTALL_PATH=~/ti/ccs1271/ccs

    Step 2:
    Need to add the path in CSS: Please refer to the link below for this step

    https://software-dl.ti.com/processor-sdk-rtos/esd/AM57X/09_03_00_00/exports/docs/rtos/index_how_to_guides.html#setup-ccs-for-evm-and-processor-sdk-rtos 


    Example: From CCS, select Window -> Preferences->Code Composer Studio -> RTSC -> Products

    Step 3:
    Create new target configuration in CCS: Please refer to the link below for this step

    https://software-dl.ti.com/processor-sdk-rtos/esd/AM57X/09_03_00_00/exports/docs/rtos/index_how_to_guides.html#create-target-configuration-file-for-evm 

    Note:- For AM57xx, select the option below

    Connection: Texas Instruments XDS100v2 USB Debug Probe

    Board or Device: IDK_AM572x / EVM_AM572x / IDK_AM571x / IDK_AM574x

    Step 4:
    If you connect to the EVM UART, use the following host configuration:

    Baud Rate      : 115200

    Data Bits        : 8

    Parity             : None

    Flow Control  : Off


    1.Project Creation:

    step 1:
    Run the pdksetupenv script to setup the PDK and SDK path variables

    Windows:
    <SDK Root>\pdk_[soc]_[version]\packages\ pdksetupenv.bat

    Linux:
    <SDK Root>/pdk_[soc]_[version]/packages$ source pdksetupenv.sh

    Step 2:
    Run the pdkProjectCreate script. The script takes parameters for creating projects for different configurations. Below are the command formats for Windows pdkProjectCreate.bat and Linuxs pdkProjectCreate.sh

    Windows Usage:
    pdkProjectCreate.bat [soc] [board] [endian] [module] [project type] [processor] [pdkDir]

    Linux Usage:
    ./pdkProjectCreate.sh [soc] [board] [endian] [module] [project type] [processor]


    Description:              (first option is default)

    soc                        - AM571x / AM572x /  AM574x

    board                    - all (use "all"SOCs)
                                     -or-
                                    Refer to SDK Root>\pdk_[soc]_[version]\packages\ti\board\lib
                                    for valid board inputs for the soc's

    endian                   -  little / big

    module                  - all
                                  -or-
                                   csl / emac / gpio / i2c / icss_emac / mcasp / mmcsd /
                                   pcie / pm / pruss / spi / uart / usb / vps / osal
     
    project type           - all / example / test

    processor              - arm / dsp / ipu

    pdkDir                   - This File Location  "<SDK Root>\pdk_[soc]_[version]\packages"

    pdkProjectCreate.bat AM572x idkAM572x little
                                 - Creates all module projects for idkAM572x device for arm little endian

    Example:

       pdkProjectCreate.bat AM572x idkAM572x little gpio all dsp

      ./pdkProjectCreate.sh AM572x idkAM572x little gpio all dsp

    Note:-
    The script creates all the projects available for given configurations. Default location of the projects created is at <SDK Root>/pdk_[soc]_[version]/packages/MyExampleProjects


    2.Project Build:

    Steps to run example projects on A15/C66x/M4 Targets

    Import Project:

    Below are the steps for importing project

    1.Open CSS -> Click on File -> Import

    2.On the Import Dialog Box select Existing CCS Project

    3.Click on Next

    4.This will pop up a new dialog box; ensure that ‘Select Root Directory’ option is selected

    5.Click on Browse and select the top level directory where the project is present.

    For example : <SDK Root>\pdk_[soc]_[version]\packages\MyExampleProjects

    6.Under the projects section you should see the project

    For Example:
    GPIO_LedBlink_idkAM572x_m4TestProject

    7.Click Finish

    Note:-

    To build the project; ensure that the project you want to build,
    i.e., GPIO_LedBlink_idkAM572x_m4TestProject is set as the active project. Click on Project -> Build Active Project, Naming convention of Projects created.

    Example:
    GPIO_LedBlink_idkAM572x_m4TestProject


    3.Run Project:
    There are no boot switches to set up for emulation mode on the AM572x EVM. When you put in the SD card, the evm switches from emulator mode to SD boot mode. By default, the evm is in emulation boot mode.


    1.Launch the CCS

    2.Launch Target configuration

    3.To execute the program ensure the following is done

    AM572x is an ARM master boot device so connect to the A15_0 first

       For A15 Target:
       1.Click on Target (A15)-> Connect -> Reset CPU

       2.Click on Target (A15) -> Load Program

       3.Select the executable file to be loaded

       Example:
       <SDK Root>\pdk_[soc]_[version]\packages\MyExampleProjects\GPIO_LedBlink_idkAM572x_armTestProject\Debug\GPIO_LedBlink_idkAM572x_armTestProject.out

       For C66x Target:
       1.Click on Target (A15)-> Connect -> Reset CPU

       2.Click on Target (C66x) -> Connect ->Load Program

       3.Select the executable file to be loaded

       Example:
      <SDKRoot>\pdk_[soc]_[version]\packages\MyExampleProjects\GPIO_LedBlink_idkAM572x_c66xTestProject\Debug\GPIO_LedBlink_idkAM572x_c66xTestProject.out


       For M4 Target:
       1.Click on Target (A15)-> Connect -> Reset CPU

       2.Click on Target (M4) -> Connect ->Load Program

       3.Select the executable file to be loaded

       Example:
       <SDK Root>\pdk_[soc]_[version]\packages\MyExampleProjects\GPIO_LedBlink_idkAM572x_m4TestProject\Debug\GPIO_LedBlink_idkAM572x_m4TestProject.out

    4.Click on OK

    5.Once the project is loaded

    click on Target -> Run to execute it

    Regards,

    Karthik