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 Debugging

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!
For the most up to date PRU-ICSS collateral click here

^ Up to main Programmable Realtime Unit Software Development Table of Contents

This arcticle is part of a collection of articles describing software development on the PRU subsystem included in OMAP-L1x8/C674m/AM18xx devices (where m is an even number).  To navigate to the main PRU software development page click on the link above.

Debugger Tools[edit]

There are currently no debugger tools for PRU code. For example, you cannot set breakpoints in PRU assembler code using CCS or some other GUI. However, there are ways to debug PRU code in the system.


Debugging Strategies[edit]

Place "printf" statements[edit]

Insert debug instructions for writing to known values to known memory locations. Under CCS you can halt the processor to examine these memory locations for changes. If possible, the DSP which loaded and started the PRU code could contain real printf statements to report the changes in the debug memory location that the PRU has modified.

Trigger debug interrupts[edit]

Similar to the printf idea, but instead of the DSP polling memory location for modification made by the PRU, the PRU interrupt controller and the DSP interrupt controller can be setup so that specific PRU events can be fired by certain parts of the PRU code. ISRs on the DSP side can then indicate to the user that the PRU events were seen. This is more complicated than the first debug recommendation, but it does allow the DSP to be running it's own code for the majority of the time. This could be important when the DSP and PRU are working in conjunction to accomplish some task.

Use PRU General Purpose Outputs (R30)[edit]

Register R30 of the PRU can be used to set values on external pins of the device. If these pins are easily monitored, one can use an oscilloscope or multimeter to see changes and make conclusion about the PRU code's progress.

Iterative debugging using dummy loops[edit]

You can insert dummy while(1) loops into the PRU code and then verify that the PRU program counter (readable in thePRU status register) points to the loop to verify that the code before the loop is getting properly executed. The listing file generated by the PASM tool should be used to determine the correct program counter location. At this point, the PRU control register can be used halt the PRU and the debug registers can be used to examine the state of the PRU's internal registers.


Return to Main Page on PRU Software Development[edit]

Click here.

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 Debugging 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 Debugging here.

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