1.1. Industrial Protocol Package Getting Started Guide

1.1.1. Introduction

The Texas Instruments PRU ICSS Industrial Packages is a single scalable software platform for Industrial Protocols solution that offers streamlined development across different TI Sitara Processors. The Industrial Protocol packages provide fundamental software for development of various Industrial communication protocols like EtherCAT, Profinet, EthernetIP. The packages also include sample demo application which showcase the ability of the software/hardware to implement those.

This package runs on top of Processor SDK RTOS and consists of (depending on the package):

  • PRU-ICSS firmware to implement Real-Time Ethernet/fieldbus
  • Associated drivers
  • Stack adaptation layer
  • Evaluation versions of protocol stack library for selected protocols
  • Sample applications

1.1.2. Package Installation

Protocol packages included in SDK package consists of source files, CCS project file scripts, pre-built libraries, documents.

1.1.3. Setup CCS for EVM and Processor SDK RTOS

The products and compilers from Processor SDK RTOS should be discoverable in CCS. Users need to ensure that products are discovered correctly by checking “Code Composer Studio -> RTSC -> Products” from “Window -> Preferences” in CCS. Similar for products, make sure compiler(s) is/are discovered correctly by checking “Code Composer Studio -> Build -> Compilers” from “Window -> Preferences”. Refer to [PDK-INSTALL-DIRECTORY]/docs/userguide/am64x/ccs_setup_am64x.html for more details.

1.1.4. Building and Running Sample Application

The Industrial Protocol package includes sample applications which demonstrate the device capabilities. Users need to generate this with the help of the Batch file or Shell scripts provided in the protocol installer packages. Refer to specific protocol package user guides Generating Project Files section for detailed instructions.

Link to Generating Project Files section
PRU-ICSS EtherCAT Slave PRU-ICSS Profinet Slave PRU-ICSS EtherNet/IP Slave

Follow the steps below after creating the project.

1.1.4.1. Importing and Building Sample Project in CCS

  1. Launch CCS.
  2. Click Menu->File->Import
  3. On new window , Select Code Composer Studio->Existing CCS Eclipse Projects and click Next.
  4. Select “Select search-directory” and browse to locate the sample application project, say [INSTALL-DIR]/<protocols | interfaces | examples>/<protocol name | interface name | example name>/projects
  5. The project will be listed under “Discovered Projects” and Select the required project from the list.
  6. It is recommended to keep “Copy Projects into workspace” tick box un-checked.
  7. Click Finish. This will import the project into workspace.
  8. The imported project will be shown in CCS Project Explorer tab.
  9. Right Click on Project, Select “Build Project”. This will build the sample project’s .out file.
  10. See the CCS Console tab for build logs.
  11. All sample applications have Debug and Release configurations.
  12. To build for a different configuration, Right click on the project and select Build Configurations ->SetActive ->Debug/Release and build the project once again.

1.1.4.2. Creating Debug Configuration to Integrate CCS GEL and DMSC Firmware Initialization

  1. For CCS setup - Refer [PDK-INSTALL-DIRECTORY]/docs/userguide/am64x/ccs_setup_am64x.html
  2. For RTOS driver interfaces and collaterals – Refer [PDK-INSTALL-DIRECTORY]/docs/pdk_introduction.html for more information

1.1.4.3. Launching and Debugging application in CCS

  1. Connect JTAG Emulator to EVM in-case of IDK or Connect USB cable to board in-case of ICE

  2. Select View->Target Configurations. Right click on the required configuration in the list and Select Launch Selected Configuration

  3. Right Click on the Main_Cortex_R5_1_0 on AM64x listed in Debug view and select Connect. (Click View->Debug to view debug window, if not visible)

    Note

    All the applications from this package run on Main_Cortex_R5_1_0 core.

  4. Select System Reset under Reset.jpg

  5. Select Suspend Suspend.jpg

  6. Load the GEL file and execute initialization script.

  7. Once the initialization is completed, Select Run->Load ->Load Program. Here browse to the required executable and click OK

  8. After a successful load, the program is expected to be in suspended state and program counter is pointing to main function. If the program is not in suspended state :

    1. Suspend the application by clicking Suspend.jpg or Run->Suspend
    2. Restart the application by clicking Runreset.jpg or Run->Restart
  9. Run the application by selecting Menu->Run->Resume.

  10. Menu->Run->Resume. This will execute the application.

Note

  • A serial communication terminal like TeraTerm, MiniCom can be opened on host PC to verify execution. Four ports should be seen on host tool after connecting to UART on EVM. You should see prints on first UART port.
  • If there is a valid application in SPI or NOR flash(in their corresponding boot mode), on “System Reset” the application loads right away. This might cause issues on the application you load via JTAG.