3.5.1. Getting Started with PRU-ICSS¶
This section covers the software aspects of getting started on the PRU-ICSS and the PRU_ICSSG. Hardware information, training material, software development resources, and more are currently located on the PRU-ICSS wiki page
The PRU Software Support Package provides support for the PRU-ICSS Subsystem in AM335x, AM437x, AM57xx, and K2G devices. This package contains:
- Support for ARM<->PRU interaction via remoteproc and rpmsg Linux
- Remoteproc supports basic control functions such as firmware load, start/halt, simple debug, and interrupt managing
- Rpmsg supports message passing
- Basic firmware examples showing simple functionality
- Register header files for easy register programming
- Library/API for controlling vrings (used for rpmsg)
Things to Obtain
- Code Composer Studio
- PRU Code Generation Tools (you can also get these tools through the CCS App Center)
- ARM running Linux
- ARM running RTOS
Installation of Tools
Tools installation paths are generally fairly arbitrary, but we do have a few requirements once you have installed to your preferred directory.
- Install Processor SDK to the directory of your choosing Follow the installation instructions found here. Location does not matter, but the default installation directory is strongly suggested and makes using the SDK’s scripts much easier.
- Install the PRU Software Support Package into the SDK you chose above Starting with Linux Processor SDK v184.108.40.206 the support package is built into the SDK at the ‘examples-applications/pru-icss-x.y.z/’ folder
- (Optional) Install CCS to the directory of your choosing CCS installation instruction for Linux can be found here. Makefiles are provided (in addition to CCS projects for most projects) in order to build all examples in the PRU Software Support Package. The ability to build the PRU projects using the Makefiles makes CCS completely optional in a Linux environment.
- There is no longer a standalone installer for the PRU Software Support Package You must now download the files from the public Git repository here.
- Install CCS to the directory of your choosing Installers can be found here.
How to Enable PRU Support in Kernel
How to Begin Programming
Programming the PRU core is not terribly different from programming any other core. Because we now have a C compiler we are able to write regular C code and have it perform tasks on the PRU cores. A great place to start development is to take a look at the Hands-on Labs that are provided in the PRU Software Support Package.
Register Header Files
Several register header files were created to help facilitate quick and easy configuration. In Linux, these are located in the <SDK_install_dir>/example-applications/pru-icss-x.y.z/include directory by default. In the Git repository these are located in the include folder. See the header files page for more information.
There are a couple of special CPU registers available with different functionality.
- Writes to R30 control the General Purpose Output pins, and reads allow the user to determine the current state of those pins
- R31 is used to read General Purpose Input pins as well as the status
of the two PRU host interrupts (bits 30 and 31)
- Writes to R31 are used to generate interrupts - see the device-specific TRM for more information on how these work.
For support please post questions on E2E Processor Support.