NOTICE: The Processors Wiki will End-of-Life in December of 2020. 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.

BIOS 5 Real-Time Analysis (RTA) in CCSv4

From Texas Instruments Wiki
Jump to: navigation, search

Overview

This article provides answers to common questions about using the RTA tools in CCSv4 specifically with a BIOS 5 application. The information here does not apply to BIOS 6 applications.

Stop Mode

Users of RTA in CCSv3 are familiar with a feature of RTA where the views display data when the target is halted, even if no data is being received while the target is running. This feature is called "stop mode" RTA.

When the target is halted, the RTA tools directly read and clear the LOG buffers on the target, and display any new LOG records in the views. This can be very helpful for seeing the most recent LOG events, as well as for retrieving records when there is a problem with RTDX.

Initial versions of BIOS 5 RTA in CCSv4 did not support stop mode. Stop mode support was added in BIOS 5.41.04 and CCSv4.1. This is a common source of confusion for RTA users who expect to see records in RTA when they halt the target. If you aren't seeing any records when you halt the target, ensure that you are working with these versions or newer.

Note: Stop-mode does not support the CPU Load or Statistics Data views. The STS objects on the target must be read and cleared regularly to ensure that the counters don't wrap. Since stop-mode only runs when the user decides to halt the target, there is no guarantee that the target will be halted frequently enough.

Supported Views

BIOS 5 RTA in CCSv4 provides the following views:

  • RTA Control Panel
  • Raw logs
  • Printf logs
  • CPU Load
  • Statistics Data

The execution graph is not supported. However, the BIOS records which normally drive the execution graph are visible in the Raw logs view in text form.

The CPU Load and Statistics Data views require RTDX, these views are not updated by stop mode.

BIOS5 Views.png

RTA Control Panel

You may enable/disable logging and runtime characteristics of BIOS program using control panel. Events are collected in Raw Logs Graph and Execution Graph Details windows unless you disable SWI, PRD, CLK, and/or TSK logging in the RTA Control Panel. Statistics for SWI, PRD, PIP, HWI, and TSK objects are displayed unless you disable the appropriate accumulators/stats in the RTA Control Panel. These flags are shown on the Diagnostics row. You may also enable or disable data collection at the logger buffer level:

BIOS5 ControlPanel.png

If your program uses TSKs but not SWIs, the Execution Graph is less complicated if you disable SWI logging. The KNL_swi software interrupt is used for processing that occurs within some DSP/BIOS functions. The switching between your tasks and the KNL_swi thread that occurs is usually not important to understanding the program execution sequence.

Explicitly programmed log messages and statistics are gathered even if you disable logging and statistics. For example, if your program calls LOG_printf or STS_add, those messages and statistics are processed even if you remove all checkmarks in the RTA Control Panel.

If you want control over whether such instrumentation program calls are made, you can use TRC_query with the TRC_USER0 and TRC_USER1 constants. You can then use the Enable USER0 trace and Enable USER1 trace boxes on the RTA Control Panel to enable and disable tracing during program execution. A program can enable or disable logging and statistics gathering using the TRC_enable and TRC_disable functions.

Raw Logs

All of the records from all of the LOGs on the target.

BIOS5 RawLogs.png

Printf Logs

Displays only LOG_printf records. These are the user's LOG statements as opposed to those coming out of BIOS.

BIOS5 PrintfLogs.png

CPU Load Graph

The CPU load

BIOS5 CPULoad.png

Statistics Data

Data gathered from the STS objects.

BIOS5 Statistics.png

ROV

If your version of BIOS or CCS does not support stop mode, then you can still view the target LOGs in ROV (under Tools -> ROV). When the target is halted, the ti.bios.LOG view in ROV will show you all of the records currently sitting in the LOG buffers on the target. ROV does not accumulate records, though, so it will only show the records currently on the target.

Keep in mind when using ROV that if run mode or stop mode RTA are working, these will clear the target buffers and you may not see anything in ROV. In this case, though, RTA is the better place to view the records anyway.

BIOS5 ROV.png

Stop Mode Buttons

The RTA views include two buttons for controlling the behavior of stop-mode RTA.

BIOS5RTA StopModeButtons.JPG

The purpose of these buttons is to allow you to manage how and when RTA updates in stop-mode. If the target buffers are particularly large, you may find that stop-mode RTA can make the GUI sluggish if you are single-stepping through code, since it will read and decode the target buffers on every step. These buttons essentially give you the option of manually controlling when stop-mode happens.

If the 'Enable RTA continuous refresh' button is toggled on, then stop-mode RTA will automatically update every time the target is halted (by hitting halt, reaching a breakpoint, etc.). This button is enabled by default. When the target is running, this button cannot be toggled, and will appear greyed-out.

If you disable this first button, then the second button can be used to manually tell stop-mode RTA to refresh. It will only refresh once per target halt, regardless of how many times the button is pressed.

Troubleshooting

No data received while the target is running

  • The target responds to requests for RTA data while it is in the idle loop. In order to receive any RTA data while the target is running, the application must spend at least some time idle.
  • Try the BIOS 5 stairstep example first. If the stairstep example doesn't work, then RTDX may not be supported on your board or emulator. Trying the example in CCSv3 is also a good way to verify this.

No data received when the target is halted

Ensure that you are using BIOS 5.41.04 or later and CCSv4.1 or later.

Also, the Statistics Data and CPU Load views are not updated by stop mode.

RTA on a simulator

If you're getting the following error in the console when you load your application:

   TMS320C64X+_0: RTDX: Not a valid RTDX program:  RTDX protocol (JTAG) does not match CCS setup (SIMULATOR)

It means you need to configure RTDX to work on a simulator instead of hardware. Add the following line to your .tcf file to resolve this:

<source lang="javascript">bios.RTDX.MODE = "Simulator";</source>

RTDX fails intermittently

Unfortunately, there are known issues with RTDX on various combinations of targets and emulators. If RTDX stops working, you can try toggling the 'Stream RTA data' button towards the top right of the view. This re-initializes RTA and may resolve the issue. If not, you will likely have to terminate and relaunch your debug session (just the debug session, not the entire CCS IDE) to resolve it.