3.5.5.4. PRU Cape Building Demos

Note

This documentation uses legacy code that is no longer supported on the TI forums (AM335x Starterware). The documentation has not been updated in several years, and some steps may not work with more recent software or tools. TI is providing this document as-is.

Introduction

The PRU Cape is a test, development, and evaluation module system that enables developers to write software and develop hardware around the PRU subsystem. This article outlines how to rebuild the Demo software available for the PRU Cape.

For more details about the PRU Cape and the Demo software, visit:


Prerequisites

The PRU Cape Demo Software is available in the PRU Software Support Package hosted on git.ti.com. To download this package, select the “Source Tree” button from the PRU Software Support Package webpage and then click “Download master as tar.gz.” In Windows, a program such as 7-zip can be used to open the downloaded file and extract the software package contents. To *EDIT* or *REBUILD* the PRU Cape demos, the following software is required:


Rebuilding the Demo Source Code

*NOTE:* This section uses the notation $PRU_SW_PATH to reference the installed location of the downloaded PRU Software Support Package.


  1. Launch CCSv6 and select the default Workspace

  2. Load the PRU_Demo and Firmware projects’ into CCS

  3. Select Project->Import CCS Projects…

    1. Browse to the pru_cape directory in the PRU Software Package sources (i.e. $PRU_SW_PATH/pru_cape)

    2. Select all projects that appear (i.e. PRU_Demo, PRU_LED0, PRU_LED1, etc)

    3. Select Finish

  4. The projects should now be visible in the Project Explorer. Don’t see the Project Explorer? Select View->Project Explorer

  5. Configure PRU_Demo project Build Configurations as “Release”

    1. Right click on the PRU_Demo project

    2. Select “Build Configurations -> Set Active -> 2 Release”

  6. Link the PRU_Demo project to StarterWare

    1. Right click on the PRU_Demo project

    2. Select Properties

    3. Select CCS Build->Environment

    4. Edit (or add) the variable named “STARTERWARE_ROOT”

    5. Update the Value of this variable to the StarterWare directory on your computer (i.e. C:/TI/AM335X_StarterWare_02_00_01_01)

    6. Select OK and OK

  7. Update PRU_Demo project Link Order

    1. Right click on the PRU_Demo project

    2. Select Properties

    3. Select CCS Build->Link Order

    4. Select Add… icon

    5. Select pru.c and pru_cape_demo.c files

    6. Select OK and OK

  8. *(Optional)* To create an SD bootable application image, add a Post-build step Note this step must be performed in Windows. If this step is skipped, a .out file will still be created, which can be loaded to and executed on the BeagleBone Black through CCS over JTAG.

    1. Right click on the PRU_Demo project

    2. Select Properties

    3. Select CCS Build->Steps

    4. Add the following text under Post-build steps:

      "${CCS\_INSTALL\_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${ProjName}.out" "${ProjName}.bin" "${CG\_TOOL\_ROOT}/bin/ofd470.exe"
      "${CG\_TOOL\_ROOT}/bin/hex470.exe" "${CCS\_INSTALL\_ROOT}/utils/tiobj2bin/mkhex4bin.exe" &
      "${STARTERWARE\_ROOT}/tools/ti\_image/tiimage.exe" "0x80000000" "NONE" "${ProjName}.bin" "${ProjName}\_ti.bin"
      
    5. Select OK

  9. Build the PRU_Demo and PRU Firmware projects

    1. Select the PRU_Demo project

    2. Select Project->Build Project

    3. Note the firmware projects are linked to the PRU_Demo project. Building the PRU_Demo project should cause the other projects to build.

    4. Building the PRU_Demo and PRU_Firmware projects should create PRU_Demo.out (located in the $PRU_SW_PATH/pru_cape/pru_demo/Release directory). This .out file can be loaded and run on the CortexA8 core through CCS over JTAG.

    5. If creating the optional SD bootable application image (Step 6 above), the Post-Build step should create PRU_Demo_ti.bin (located in the $PRU_SW_PATH/pru_cape/pru_demo/Release directory). Rename PRU_Demo_ti.bin to app and follow the steps on the PRU Cape Getting Started Guide to prepare the SD Card.


Running the Demos

Refer to the PRU Cape Getting Started Guide for details about running the demos.