How do I configure RVD/RVI to capture ETM Trace using RVT on the PB-A8?
Applies to: PB-A8, RealView Development Suite (RVDS), RealView ICE and Trace (RVI / RVT)
The Cortex-A8 processor integrated on the PB-A8 development platform supports CoreSight Technology for trace. This Knowledge Article explains how to configure RealView Debugger (RVD v4.0 and later) and RealView ICE (RVI v3.3 and later) for external trace on the PB-A8 using the Trace Port Interface Unit (TPIU). A PB-A8 configured with Versatile Family CD v3.5 requires RealView Trace 2 (RVT2) for trace capture.
Note: Please update your PB-A8 firmware to the latest version as supplied on the ARM Versatile Family DVD/CD.
The following software must be installed in order to perform trace on the PB-A8:
- RealView Development Suite (v4.0 or later)
- RVI Firmware as provided with the RVDS installation
To obtain the latest patches for RVDS, please visit the ARM Silver delivery website here:
http://silver.arm.com (login required)
The following steps are needed to configure the RVD and RVI to enable trace capture on the PB-A8 development board:
- Connect the RVI unit to the JTAG port located on the rear panel of the PB-A8 and the RVT probe to J54 on the PB-A8 (for up to 16-bit trace) and to J55 (for up to 32-bit trace). Note that for 32-bit trace a 32-bit dual-Mictor trace probe and an RVT2 unit are required.
- Power up the PB-A8 and the RVI unit.
- Start RVD. Select Target → Connect to Target from the Menu. This opens the RVD connection control window.
- In the RVD connection control window, click on the "Add" button next to "RealView ICE". This opens the "RVConfig" window.
- In "RVConfig" select your RVI unit from the list displayed and click the "Connect" button.
- Click "Auto Configure Scan Chain" to autodetect the CoreSight system. It will result in the scan chain in Figure 1 being found.
- In "RVConfig", click on "Trace Associations" to view the relationship between trace sources and sinks. The order in which components are described needs to be modified to support RVD. This will be done automatically when you exit the dialog.
Click "OK" to close the "Trace Associations" dialog, the "Warning-RVD Trace" window suggests to reorder the components in the scan chain in order to support trace. Click "Yes". This will result in the reordered scan chain shown in Figure 1.
- In the "RVConfig" window select the File tab, Save and Exit.
The RVD configuration steps can be gathered in a script to be loaded in RVD. This script contains the RVD commands that perform the connection to the Coresight components and the configuration for the ETM, Funnel and TPIU registers.
An example of an RVD configuration script file which configure the PB-A8 for 16-bit trace is available here:
- Save this file in a local directory.
- To load the Commands script file in RVD: from the main Menu navigate to Tools → Include Commands from File and browse to the location of the file.
- Click View → Analysis Window to open the Analysis window. Click the Edit tab and select the "Connect/Disconnect Analyzer" option.
- Finally load an image and run it. You should get trace output in the Analysis window.
Alternatively, you can manually configure RVD using the following steps:
- The RVD connection control window should now show all of the devices in the scan chain, except for the ARMCS-DP.
- Double click on Cortex-A8 to connect. Do the same for the ETM, Funnel, and TPIU.
Next we will set up the registers for the ETM, TPIU, and Funnel:
- Open a Registers window by selecting View → Registers from the Menu. To see the registers for each of the components, use the "Cycle Connections" button from the Menu.
- Select the ETM and in the Registers window set the "ETM CS TRACE ID" register to a small non-zero value, for instance 0x55.
- Select the TPIU. In the Registers window set the CSTPIU CURPORTSIZE register to the required Port Width - 0x80000000 for 32-bit trace, 0x8000 for 16-bit trace, 0x80 for 8-bit trace or 0x8 for 4-bit trace.
- Select the Funnel. In the Registers window set the CSTF CTRL register to 0x301 to allow the ETM to output trace data through the TPIU.
- In the RVD window, click the "Cycle Connections" button to select the Cortex-A8 core. Click View → Analysis Window to open the Analysis window. Click the Edit tab and select the "Connect/Disconnect Analyzer" option.
- Load an image and run it. You should get trace output in the Analysis window. Note that to be able to see the trace output on the Analysis window you should stop the target or disable trace.
Note: For any information regarding the Coresight components configuration please refer to the Coresight Components Technical Reference Manual available at the ARM Website:
Attachments: auto_wo_reorder.png , reordered.png , script_trace_PBA8.inc
Article last edited on: 2011-08-10 10:59:19
Rate this article
Disagree? Move your mouse over the bar and click