ARM Technical Support Knowledge Articles

How do I configure RVD_4.0/RVI_3.3 to capture ETM Trace using RVT on the Microcontroller Prototyping System (MPS)?

Applies to: MPS, RealView Development Suite (RVDS), RealView ICE and Trace (RVI / RVT)


The Cortex-M3 processor implemented on the Microcontroller Prototyping System (MPS) board supports CoreSight Technology for trace. This Knowledge Article explains how to configure RealView Debugger v4.0 (RVD v4.0) and RealView ICE v3.3 (RVI v3.3) for external trace on the MPS using the Trace Port Interface Unit (TPIU).

The following software must be installed in order to perform trace on the MPS:

To obtain the latest patches for RVDS 4.0/RVDS 4.0 Pro, please visit the ARM technical support web pages:

The following steps are needed to configure the RVD 4.0/RVI 3.3 interface to the MPS development board:

RVI Configuration:

  1. Connect the RVI unit to the Debug port located on the rear panel of the MPS and the RVT probe to the MICTOR connector located on the HM-ALC module.
  2. Power up the MPS and the RVI unit.
  3. Start RVD. Select Target → Connect to Target from the Menu. This opens the RVD connection control window.
  4. In the RVD connection control window, click on the "Add" button next to "RealView ICE". This opens the "RVConfig" window.
  5. In "RVConfig" select your RVI unit from the list displayed and click the "Connect" button.
  6. Click "Auto Configure Scan Chain" to autodetect the CoreSight system. It will result in the scan chain in Figure 1 being found.
  7. 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.
  8. 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.

    Figure 1
  9. In the "RVConfig" window select the File tab, Save and Exit.

RVD Configuration:

The RVD configuration steps are provided in the script

Alternatively, you can manually configure RVD using the following steps:

  1. The RVD connection control window should now show all of the devices in the scan chain, except for the ARMCS-DP.
  2. Double click on Cortex-M3 to connect. Do the same for the ETM and TPIU.

    Next we will set up the registers for the ETM and TPIU:

  3. 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.
  4. Select the ETM and in the Registers window, set CS_LOCKACCESS=0xC5ACCE55. Right click in the Registers pane and select 'Update View'. CS_LOCKSTATUS should change from 0x3 to 0x1 indicating CS registers unlocked. Set ETM_CS_TRACE_ID=0x7 (any small non-zero value is OK, this is the ID for this trace component in the output trace data).
  5. Select the TPIU and in the Registers window check that CSTPIU_SUPPORTSIZE=0xB (1, 2, 4 bit port widths allowed). Set CSTPIU_CURPORTSIZE to 0x8 for 4-bit trace.
  6. In the RVD window, click the "Cycle Connections" button to select the Cortex-M3 core and in the Memory window set the memory location 0xE00400F0 to 0x00000000 (set Trace Port mode in TPIU, rather than SWO by default set to 0x00000001).  
  7. In the Registers window, select the "Debug" tab and select the "Ctrl_Reg" option as Reset Type. This is needed to ensure the system initialization sequence is being done correctly. 
  8. In the RVD window, navigate to Target and click the "Reset Target Processor" option.
  9. Click View → Analysis Window to open the Analysis window. Click the Edit tab and select the "Connect/Disconnect Analyzer" option.
  10. Load an image and run it. You should obtain 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: scan_chain.JPG ,

Article last edited on: 2009-04-30 13:27:13

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential