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¶
- Launch CCS.
- Click Menu->File->Import
- On new window , Select Code Composer Studio->Existing CCS Eclipse Projects and click Next.
- 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
- The project will be listed under “Discovered Projects” and Select the required project from the list.
- It is recommended to keep “Copy Projects into workspace” tick box un-checked.
- Click Finish. This will import the project into workspace.
- The imported project will be shown in CCS Project Explorer tab.
- Right Click on Project, Select “Build Project”. This will build the sample project’s .out file.
- See the CCS Console tab for build logs.
- All sample applications have Debug and Release configurations.
- 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¶
- For CCS setup - Refer
[PDK-INSTALL-DIRECTORY]/docs/userguide/am64x/ccs_setup_am64x.html
- 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¶
Connect JTAG Emulator to EVM in-case of IDK or Connect USB cable to board in-case of ICE
Select View->Target Configurations. Right click on the required configuration in the list and Select Launch Selected Configuration
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.
Select System Reset under
Select Suspend
Load the GEL file and execute initialization script.
Once the initialization is completed, Select Run->Load ->Load Program. Here browse to the required executable and click OK
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 :
- Suspend the application by clicking or Run->Suspend
- Restart the application by clicking or Run->Restart
Run the application by selecting Menu->Run->Resume.
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.