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.
DSP/BIOS Real-time Analysis (RTA) troubleshooting
- 1 Overview
- 2 Configuration Options
- 3 Other RTA-related Issues
The Real-Time Analysis (RTA) Tools provide a means of gathering info at run-time with low overhead to the target. Capabilities of RTA include:
- LOG_printf for logging messages (similar to printf, but consumes fewer cycles and does not halt the target for message transfer)
- Statistics (STS) objects for gathering real-time performance info
- CPU load graph
The above information can be viewed from the host PC using CCStudio:
- LOG_printf can be viewed in CCStudio through DSP/BIOS -> Message Log
- Statistics can be viewed through DSP/BIOS -> Statistics View
- CPU load graph can be view through DSP/BIOS -> CPU Load Graph
In order to get the full real-time capabilities working, i.e. data streaming in real-time to CCStudio, it is important to understand that there are two underlying components:
- RTA is part of DSP/BIOS and it is the mechanism that logs the data. From the RTA perspective the data is simply being dumped to a memory buffer on the target. RTA doesn't do any direct communication with CCStudio.
- Real Time Data eXchange (RTDX) is a library used by DSP/BIOS to transport the RTA info from the target to CCStudio.
In order to get RTA working with CCStudio one needs to check several configuration optioins. This topic covers most of the common things to check to ensure proper functionality.
To ensure that RTA is enabled (checked) from the GBL Setting Properties page. You may also want to make sure the Enable All TRC Event Class is also enabled. This will ensure that proper trace mask is set at DSP/BIOS startup. The mask can be adjusted at run-time via the TRC module APIs or the RTA Control Panel in CCStudio (access via the DSP/BIOS tools bar).
Enable RTDX for RTA run-time host display
To display RTA data at run-time via the DSP/BIOS CCStudio tools, the Real-time Data Exchange (RTDX) option must also be enabled in the configuration tool. Set it to either JTAG, HSTRTDX (High-spedd RTDX), or Simulator depending on the device. You must also set the Host Channel Manager (HST) link type to RTDX (see below).
Note: If RTDX isn't enabled RTA data is gathered on the target but only displayed on the host side tools when target is halted (stop-mode).
Trace must be enabled
A variable is used by the target at run-time in order to decide which things should be logged (SWIs, TSKs, etc) in the DSP/BIOS system log. The info contained in this variable is viewable in CCStudio by going to DSP/BIOS -> RTA Control Panel. By default all the boxes should be checked. If none of the boxes are checked then you would not see anything in the Message Log under Execution Graph Details.
By default all of these tracing (TRC) features are enabled when the Enable All TRC Event Class configuration option checked (see Enable RTA) , so normally one would not need to worry about this feature. However, there are cases where it might be turned off by one of the tcf files being used. For example, the DSP/BIOS Link applications typically have a line in their tcf file to disable all the tracing:
// DSP/BIOS Link will disable trace in its tcf file // Note these lines are not all together bios.disableRealTimeAnalysis(prog); bios.disableRtdx(prog); prog.module("GBL").ENABLEALLTRC = false;
You could delete that line from Link's tcf file or better yet add this line to your own tcf file to override that setting:
// Override the setting from DSP/BIOS Link by adding this to your own tcf file bios.enableRealTimeAnalysis(prog); bios.enableRtdx(prog); prog.module("GBL").ENABLEALLTRC = true;
RTA only works when the target CPU is halted
In this scenario the RTA itself is working, but the RTDX transport is not. Here are a few thing to check.
- Ensure the RTDX feature is enabled (see above)
- Check to make sure there isn't a mis-match between DSP/BIOS version used to build the application and version of DSP/BIOS selected via CCStudio Component Manager
- To open up the CCStudio Component Manager go to:
Start (Menu) -> Texas Instruments -> Code Composer Studio 3.3 -> Component Manager
or within CCStudio select Help (Menu) -> About -> Component Manager
- In the Component Manager tool, open Target Content (DSP/BIOS) Folder. Open the appropriate target folder for your device and select (check box) the version of DSP/BIOS the application was build for.
- Subsequently, if the DSP/BIOS version used to build the application is unknown the application can be re-built with the version selected via the Component Manager and the application re-run. This will ensure the version used by CCStudio RTA tools are the same version as the newly built application. CCStudio must be re-started when the DSP/BIOS version had been changed via the Component Manager.
- Be careful of any hard-coded paths to DSP/BIOS libraries/headers in your build environment. Those options must match the version selected in the Component Manager. If you are using CCS pjt-based build system you do not need any references to DSP/BIOS libraries as it will automatically add references that correspond to your selection in the Component Manager.
- To open up the CCStudio Component Manager go to:
- Make sure the RTDX interrupts are enabled.
- For 64x+ devices make sure that INT3, INT11, INT12 are enabled in the IER register. Since INT11 and INT12 are configurable interrupts you should not modify them (i.e. do not plug/map some other interrupt instead).
- For C64x devices make sure that INT3 & INT9 are enabled in the IER register when using JTAG mode for RTDX (INT3, INT11, INT12 if using HSRTDX mode for RTDX). Since INT9 (or INT11 & 12) are configurable interrupts you should not modify them (i.e. do not plug/map some other interrupt instead).
- In order for RTDX to work a small amount of work needs to be done by the CPU. This happens during the BIOS idle loop. If the CPU is so heavily loaded that the idle loop cannot run then you will not see real-time transfer of data.
Unable to open RTA Tools in CCStudio
There are several different types of errors that you might get when attempting to open the RTA tools in CCS:
RTA Server Error
Cause: Registry entry HKEY_LOCAL_MACHINE\SOFTWARE\GODSP\CodeComposer\Plugins\Server Tools\RealTimeAnalysis corrupt or missing.
Potential cause of registry entry corruption/missing is missing entry for RTA Server in ccs_Compdb.ini file because of problem during installation (regsvr32 of dll failed).
CAUTION: To workaround to issue, add/correct the above entry in the registry.
VBD not loaded error
Registry entry for the DSP/BIOS version selected in the CCStudio Component Manager contains a corrupt invalid registry path
To workaround the issue re-install the DSP/BIOS version being used. De-select the DSP/BIOS version from the Component Manager, close CCStudio and re-install DSP/BIOS. Once installed re-enable the DSP/BIOS version via the CCStudio Component Manager.
BIOS – LOG window shows **ERROR**
If your LOG output shows e.g.
2 *** ERROR: 0x0 0x200c4ddc ***
the likely cause is that your link step is placing some strings in a separate section (not .const). LOG_printf() will only work if strings are in .const or .printf. If string is not in one of these sections, the host LOG plugin will flag the LOG record with "ERROR".
Remove any DATA_SECTION pragma’s you have that place the LOG strings in sections other than .const or .printf
BIOS – cdb file error when opening RTA plugin
You open a BIOS 4.90 RTA plugin and get the following…
Likely cause is .cdb is not in the same directory as the .out file.
In BIOS 4.9x .cdb file needs to be in same directory as the .out file. Or one directory above the .out file.
In BIOS 5.x, the .cdb file is not needed for RTA so this is not a problem