15.5.4 DTSL trace source objects

These objects represent sources of trace data within the platform. These could be ARM® devices such as:
These devices must implement the ITraceSource interface to be recognized as a trace source and to provide ATB ID information. They typically also implement IDevice. Most of these types of device only implement the register access methods from IDevice to allow configuration and control of the device, and they usually have a partner class which defines the names of the registers supported. For example, the STMTraceSource class has a partner class called STMRegisters which, for convenience, defines the STM register set IDs and many of their bit fields.
The class hierarchy for trace source objects is shown in the following figure:
Figure 15-6 DTSL Trace Source class hierarchy
DTSL Trace Source class hierarchy

When implementing new trace source objects, you can choose to base them on TraceDevice, ConnectableTraceDevice, TraceSource, or ConnectableTraceSource. The choice depends on whether the source needs a connection, and whether it can identify itself in the trace stream with a source ID. As shown in the figure, all the standard ARM trace sources are derived from ConnectableTraceSource. This is because they are real devices which can be connected to for configuration, and which have ATB IDs to identify themselves in the received trace stream.
The following is a typical code sequence from a DTSL Jython script to create an ETM trace source:
1. devID = self.findDevice("CSETM")
2. etmATBID = 1
3. self.ETM = ETMv3_3TraceSource(self, devID, etmATBID, "ETM")		
Line 1 locates the CSETM device ID (RDDI-DEBUG device index number) from the RDDI configuration. Line 2 assigns the ATB ID to be used for the ETM. Line 3 creates the DTSL ETMv3_3TraceSource object and names it “ETM”. If there are multiple ETMs in the platform, they should have different names, such as “ETM_1” and “ETM_2”, or “ETM_Cortex-A8” and “ETM_Cortex-M3”.
After creating the trace source objects, you must inform any trace capture device about the set of trace source objects to associate with it. This allows the client program to locate the ATB ID for the source of interest and request delivery of trace data for that source.
Related concepts
15.5.5 DTSL trace capture objects
Non-ConfidentialPDF file icon PDF versionARM DUI0446W
Copyright © 2010-2015 ARM. All rights reserved.