2.13.3.1 Setting a trace start event and a trace end event

On the Editor panel or Disassemble panel, set the events at which you want the collection of trace data to start and finish.

(1)

For execution-related events

By setting execution-related events for the trace start and trace end events, it is possible to start and finish the collection of trace data at any place.

To set an execution-related event as the trace start event, move the caret to the line or addressNote at which you want the collection of trace data to start and then choose [Start Tracing] from [Trace Settings] on the context menu.

A trace start event is set for the instruction at the beginning address corresponding to the line or address at the caret position.

Also, when you set an execution-related event as the trace end event, move the caret to the line or addressNote at which you want the collection of trace data to finish and then choose [Stop Tracing] from [Trace Settings] on the context menu.

A trace end event is set for the instruction at the beginning address corresponding to the line or address at the caret position.

Note

Trace start and trace end events cannot be set on lines that have no addresses displayed.

 

When trace start and trace end events are set, the following event marks are displayed in the event area of the relevant line or address.

Table 2.11

Trace Start Event and Trace End Event Marks (Execution-related Events)

Type

Event mark

Trace start

 

Trace end

 

Figure 2.141 Example of Trace Start and Trace End Events Set by Using Execution-related Events
(For the Disassemble panel)

(2)

For access-related events

By setting access-related events for the trace start and trace end events, it is possible to start and finish the collection of trace data when a specified access is made to any variable or I/O register.

At this time, it is also possible to limit the values accessed.

The types of access specifiable in access-related events are as follows:

Table 2.12

Types of Access for Variables

Access Type

Description

Read

Collection of trace data is started or finished when a specified variable or I/O register is accessed for read (i.e., to read data from it).

Write

Collection of trace data is started or finished when a specified variable or I/O register is accessed for write (i.e., to write data to it).

Read/write

Collection of trace data is started or finished when a specified variable or I/O register is accessed for read or write (i.e., to read or write data).

Remark

Accesses by DMAC (Direct Memory Access Controller) and DTC (Data Transfer Controller) are not supported.

 

-

To set events for variables or I/O registers in source text or disassembled text
Perform this operation in the Editor panel/Disassemble panel in which the source text/disassembled text is displayed.
Select any variable or I/O register in the source text or disassembled text and then select the desired operation from the context menu as described below. However, the variables you can select are only global variables, static variables inside a function, or static variables inside a file.
Note that when you have performed this operation, it is interrupted as if a trace event (access-related) has been set for the selected variable or I/O register, and it is managed on the Events panel (see 2.17 Event Management").


Access type

Operation

Read/write

[Trace start event]

Choose [Record Start R/W Value] from [Trace Settings] and then hit the [Enter] key.

[Trace end event]

Choose [Record End R/W Value] from [Trace Settings] and then hit the [Enter] key.

If a value is specified in the text box of the menu at this time, collection of trace data is started/finished only when the specified value is used for the reading or writing. On the other hand, if no value is specified, reading or writing the selected variable by any value will start/finish the collection of trace data.

Caution 1.

Only the variables in current scope are selectable.

Caution 2.

No trace event can be set for a variable or I/O register on a line whose background color in the event area is grayed (indicating that the line cannot be converted into a corresponding address). To set this trace event, select a variable or I/O register on a line whose background color in the event area is white.

Caution 3.

The types of access that can be set from the source text or disassembled text are only a read/write. To change the access type to a read or write, after setting trace start and end events, edit them in a dialog box that opens from the Events panel (see 2.13.3.4 Editing trace start and trace end events").

-

To set events for registered watch-expressions
Perform this operation on the Watch panel.
After selecting the watch-expression for which you want to set an event (multiple selections not accepted), perform the following operation from the context menu. However, the watch-expressions you can select are only global variables, static variables inside a function, static variables inside a file, and I/O registers.
Note that when you have performed this operation, it is interrupted as if a trace event (access-related) has been set for the selected watch-expression, and it is managed on the Events panel (see 2.17 Event Management").


Access type

Operation

Read/write

[Trace start event]

Choose [Record Start R/W Value] from [Trace Output] and then hit the [Enter] key.

[Trace end event]

Choose [Record End R/W Value] from [Trace Output] and then hit the [Enter] key.

If a value is specified in the text box of the menu at this time, collection of trace data is started/finished only when the specified value is used for the reading or writing. On the other hand, if no value is specified, reading or writing the selected watch-expression by any value will start/finish the collection of trace data.

Caution 1.

Only the watch-expressions in current scope are selectable.
To use any watch-expression outside the current scope for a trace event, select a watch-expression that has its scope specified.

Caution 2.

The access types that can be set from watch-expressions are only a read/write. To change the access type to a read or write, after setting trace start and end events, edit them in a dialog box that opens from the Events panel (see 2.13.3.4 Editing trace start and trace end events").

 

When a trace start event and trace end event are set, they are managed collectively on the Events panel as one instance of a trace event. (When you click the "+" mark at a trace event item, detailed information on the trace start and trace end events you've set is displayed.)

Caution 1.

When both the trace start and trace end events have been set, trace data is collected every time the start condition and end condition are met. In such cases, the disassembled code displayed in the [Trace] panel will not be correct.

Caution 2.

The [Trace] panel shows no trace information if the type of all trace cycles is "BCND".

Caution 3.

[E20(JTAG) [RX600 Series]]
Do not use the trace start and trace end events if you have enabled [Real-time RAM monitor] in the [Usage of trace function] property under the [Trace] category. Also delete any events using the Events panel that have been set.

Remark 1.

If either one of the trace start and trace end events set is Enabled, the unconditional trace event check box on the Events panel is automatically deselected, so that the trace data from the trace start event to the trace end event is collected.

Remark 2.

The trace start event may be left unset if it is unnecessary. If the trace start event is not set, trace data collection starts when program execution starts. Likewise, if the trace end event is not set, trace data collection ends when program execution stops.

Remark 3.

The event mark varies with the set states of events (see 2.17.1 Changing states of setting (Enabled/Disabled)").
Also, if a new event is set at a place where an event has already been set, the event mark is displayed, indicating that multiple events have been set.

Remark 4.

[Simulator]
If either one of the trace start and trace end events set is Enabled, the [Use trace function] property in the [Trace] category on the Property panels [Debug Tool Settings] tab has its specification automatically changed to [Yes], with the trace function enabled.