Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
PRU-ICSS Debug on AM335x
This page is intended to help users with very early PRU development. This is intended to be OS-agnostic and a simple way of connecting to the PRU, loading a program, and being able to debug through CCS. The goal is to get some of the low level logic in place (e.g. creating waveforms on the pins or doing whatever you're trying to accomplish with the PRU). This does NOT communicate with the Cortex A8. It is intended for simple, stand-alone development to get things rolling. Once you have the base functionality in place, then you can look at adding communication with the A8.
Because the PRU-ICSS cores are deeply embedded inside the AM335x, there are multiple registers that need to be configured in order to perform JTAG debug. This includes:
- ICSS clocks
- ICSS reset
- Pin muxing for PRU-ICSS signals
- And in some cases even enabling various JTAG clocks so you can connect. (Linux turns many clocks off.)
A script was developed in large part from the work in Debug Configuration Initialization Scripts to handle this automatically.
- AM335x Beaglebone Black - Order Now
- BeagleBone PRU Cape - Order Now
- 5V power supply or USB cable connection
- JTAG emulator
- FTDI cable
- PRU software package (no longer updated - use one of the options in the sub-bullets)
- Can clone the latest by cloning the repo, git clone git://git.ti.com/pru-software-support-package/pru-software-support-package.git. -OR-
- Can download the latest by going here and clicking "Download master as tar.gz".
- CCSv6 or later
One time setup
- Create your target configuration file. This is the ccxml file that specifies which JTAG probe you have as well as the processor. If you don't have this already you can go to File -> New -> Target Configuration to create this.
- Your Target Configuration file must either reside in the same directory as your project or alternatively you can right-click on it and set it as the default.
- Import one of the projects from the "pru_cape" directory of the PRU software package such as PRU_Hardware_UART.
- Create a starter "Debug Configuration" by launching the project. (You will not connect all the way -- yet...)
- Click the "bug" icon.
- Specify whether this particular project will load to one or both PRUs. Let's choose only PRU_0 (i.e. de-select PRU_1).
- The project will build.
- CCS will attempt to connect and load. Generally you will hit an error here. That's ok. The goal of this step was to generate a Debug Configuration.
- Click the arrow next to the debug icon and then choose Debug Configurations:
- For the "Initialization Script" for your project you will need to browse to the am335x-bbb-pru-startup.js file:
- Click "Apply" and "Close".
Debugging your project
Now that we have everything setup, debug should be a breeze:
- Click the "bug". This will build your project, launch the debugger, configure all the necessary registers, and load your code.