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.

PRU-ICSS Debug on AM335x

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

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.

Steps Involved[edit]

Prerequisites[edit]

Hardware

  • AM335x Beaglebone Black - Order Now
  • BeagleBone PRU Cape - Order Now
  • 5V power supply or USB cable connection
  • JTAG emulator
  • FTDI cable

Software

  • 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
  • am335x-bbb-pru-startup.js


One time setup[edit]

  1. 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.
  2. 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.
  3. Import one of the projects from the "pru_cape" directory of the PRU software package such as PRU_Hardware_UART.
  4. 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.
  5. Click the arrow next to the debug icon and then choose Debug Configurations:
    Am335x-pru-debug-configuration.png
  6. For the "Initialization Script" for your project you will need to browse to the am335x-bbb-pru-startup.js file:
    Am335x-pru-debug-configuration2.png
  7. Click "Apply" and "Close".

Debugging your project[edit]

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.

Video Demo[edit]

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 PRU-ICSS Debug on AM335x 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 PRU-ICSS Debug on AM335x here.

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