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.

Industrial Protocol Package Getting Started Guide

From Texas Instruments Wiki
Jump to: navigation, search

Ti stk 1c rev rgb png.png

Last updated: 02/15/2018



Introduction[edit]

The Texas Instruments PRU ICSS Industrial Packages is a single scalable software platform for Industrial Protocols/Drives 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, Profibus etc. PRU-ICSS Industrial Drives package is designed for the Sitara processor AM437x (with PRU-ICSS IP) to enable customers leverage Industrial Drives (position, current sense & control algorithm) capabilities. 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 and consists of (depending on the package)

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

Package Installation[edit]

Protocol packages installer is a windows or linux executable which installs source files, CCS project file scripts, pre-built libraries, documents, tools and other items to the host machine.

Processor SDK Patching and Rebuilding[edit]

PRU-ICSS Industrial Protocols may require patches to be applied on top of recommended version of Processor SDK to fix certain functional issues. In that case, industrial protocol installer will package those patch files. User need to make sure that these patches are applied properly on Processor SDK and affected LLD's are rebuilt before building industrial protocol application projects.

Setting up the patching tool[edit]

1. Go to the link http://gnuwin32.sourceforge.net/downlinks/patch-bin-zip.php, download and save the patch utility.


Downloading patching utility.png


2. Extract the zip file to the Windows PC. Patch file utility(Patch.exe) can be found in bin folder

NOTE: That this is not a TI tool - see http://savannah.gnu.org/projects/patch/ for more details and licensing information

Locating the patch files in PRU-ICSS industrial protocol package[edit]

After installing the PRU-ICSS Industrial Protocol package, navigate to <INSTALL_DIR>/protocols/pdk_patches/<Processor_SDK_Version> where

INSTALL_DIR  : The folder location where the Industrial protocol package is installed.
PROCESSOR_SDK_VERSION : The recommended version of Processor SDK which is compatible with PRU-ICSS Industrial Protocol package.

Bulb.pngTo know about the recommended version of Processor SDK package, refer system requirements section in PRU-ICSS Industrial protocol package Release Notes

Patch folder location from Profinet-slave 1.0.2 release package is shown below for reference

Patch folder location reference.png

Bulb.pngIf the pdk_patches folder is not present in the PRU-ICSS industrial protocol package, it means that specified version of Processor SDK does not need any patches to work with PRU-ICSS Industrial protocols

Applying the patch[edit]

  1. Launch DOS Command prompt(Start->Run->cmd)
  2. CD to bin folder
  3. Execute patch.exe with following syntax in windows environment

patch.exe -i PATCH_FILE_FULL_PATH -d SOURCE_DIR -p<n> --binary --verbose

           PATCH_FILE_FULL_PATH:  Full path where PATCH file is kept in PC
SOURCE_DIR  : The Processor SDK install directory (PDK_INSTALL_PATH)
-p<n>  : Remove <n> leading slashes from traditional diff paths. The default is 1. --binary  : To fix the assertion failure issue documented at http://gnuwin32.sourceforge.net/packages/patch.htm --verbose  : To display patch command output

Eg: D:\patch_utility\patch-2.5.9-7-bin\bin\patch.exe -i C:\ti\PRU-ICSS-Profinet_Slave_01.00.02.02\protocols\pdk_patches\04.02.00\PRSDK-3454-finalPrioQueue_mismatch.patch -d C:\ti\pdk_am335x_1_0_9\packages -p0 --binary --verbose

Processor sdk patching.PNG

Rebuilding the Processor SDK LLD's[edit]

Refer to http://processors.wiki.ti.com/index.php/Rebuilding_The_PDK for details on rebuilding Processor SDK LLD's on windows/linux

Running Pre-Built Applications[edit]

The following pre-built applications can be used for a quick start with IDK. Release notes will have the information on where to obtain pre-built binaries for each release,

  • EtherCAT Slave Application
  • Profinet IRT Slave Application
  • Profinet RT Slave + MRP Application
  • EnDat Diagnostic Application
  • Tamagawa Diagnostic Application
  • Motor Control Application



These binaries will be available as a separate package(not available with the installer). Loading the binaries(app) with the corresponding SD Card MLO from PDK should enable a quick setup to validate the environment.

Running Application from SD card/QSPI Flash
[edit]

Refer to http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_BOOT_AM57x


Building and Running Sample Application[edit]

The Industrial Protocol package includes sample applications which demonstrate the device capabilities. Unlike [| legacy Industrial SDK], the CCS project files are not readily available in the protocol package. 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

Importing and Building Sample Project in CCS[edit]

  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.


Creating a target configuration, if one doesn't exist already.[edit]

  1. File menu-> New-> Target Configuration File
  2. Check "Use shared location" to be available to anyone who uses the workspace. Click Finish. A window opens up which is to configure the connection details
  3. Connection: Choose the host-to-target connection details. For example "Texas Instruments XDS100v2 USB Emulator" 
  4. Device: Select IDK_AM572x or PRELIM_IDK_AM571x for AM57x, for AM437x select IDK_AM437X
  5. Click Save.

 


Launching and Debugging application in CCS[edit]

  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 Cortex A15_0 on AM57x or CortexA9 on AM437x listed in Debug view and select Connect. ( Click View->Debug to view debug window, if not visible. )
  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

  • While launching a debug session for the first time, CCS will ask for the CPU to which the program needs to be loaded. Please select Cortex-A15_0 or CortexA9 (depending on the platform) and continue.
  • If TeraTerm does not display an output upon program execution. TeraTerm can be initialized just prior to program execution by performing steps 1-8 and then
    Disconnect the terminal session using File -> Disconnect
    Reconnect the terminal session with File -> New Connection
  • 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. To avoid this, put a hardware breakpoint at 0x402f_0400(in case of MMSCD boot mode) or 0x30000000(in case of qSPI boot mode) and then do a "System Reset". You can then continue with Step 4 after this step.

 

  • On AM57xx IDKs, doing a system reset will disconnect JTAG connectivity on CCS, connect again and repeat to load the application  
  • Once a system reset is done, the CCS console logs will not be printed. To regain this, relaunch the target configuration;

  • Additional Resources[edit]

    The Sitara Frequently Asked Questions (FAQ) contains answers to a number of common questions on Sitara Industrial topics. The Sitara FAQ is available at: http://processors.wiki.ti.com/index.php/FAQ_Sitara_Industrial .

    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 Industrial Protocol Package Getting Started Guide 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 Industrial Protocol Package Getting Started Guide here.

    C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Industrial Protocol Package Getting Started Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Industrial Protocol Package Getting Started Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Industrial Protocol Package Getting Started Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Industrial Protocol Package Getting Started Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Industrial Protocol Package Getting Started Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Industrial Protocol Package Getting Started Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Industrial Protocol Package Getting Started Guide 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