Everything
2.13.4 Collecting an execution history only when conditions are met

It is possible to collect an execution history of the program only when some conditions are met.

(1)

When an access to a variable or I/O register occurred

In cases where a point trace event is set, when and only when a specified access is made to any variable or I/O register, information on that is collected as trace data.

Follow the procedure described below to set a point trace event.

Caution 1.

Also see "2.17.7 Points to note regarding event setting" for details on trace settings, including the allowable number of valid events.

Caution 2.

[Simulator]
With string manipulation instructions and multiply-and-accumulate instructions, only the first and final data accesses are subjected to the event check.

Remark 1.

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

Remark 2.

[Simulator]
If either one of the point trace events set is Enabled, the [Usage of trace function] property in the [Trace] category on the Property panel's [Debug Tool Settings] tab has its specification automatically changed to [Yes], with the trace function enabled.

Remark 3.

When a point trace event and trace start and end events are specified together, the operation differs depending on the debug tool used.

-

[E1] [E20] [EZ Emulator]
Only the data that matches the point trace event condition within the section between the specified trace start and end events is collected as trace data.

-

[Simulator]
The execution history within the section between the specified trace start and end events and the data that matches the point trace event condition regardless of the section between the specified trace start and end events are collected as trace data.

(a)

For access to a variable or I/O register in the source text or disassembled text

Perform this operation in the Editor panel/Disassemble panel in which the source text/disassembled text is displayed.

Select the variable or I/O register as the subject to access and, according to the access type you specify, perform the following operation from the context menu. 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 point trace event 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

Select [Record Reading Value] from [Trace Settings].

Write

Select [Record Writing Value] from [Trace Settings].

Read/write

Select [Record R/W Value] from [Trace Settings].

Remark

Only the variables in current scope are selectable.

(b)

For access to a registered watch-expression

Perform this operation on the Watch panel.

Select the watch-expression as the subject to access and perform the following operation from the context menu. (See “2.11.6 Displaying and changing watch-expressions".)

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 point trace event has been set for the selected watch-expression, and it is managed on the Events panel (see "2.17 Event Management" for details).

Access Type

Operation

Read

Select [Record Reading Value] from [Trace Output].

Write

Select [Record Writing Value] from [Trace Output].

Read/write

Select [Record R/W Value] from [Trace Output].

Remark

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

 

When you've finished setting a point trace event, execute the program (see "2.9 Execute Programs").

When the condition for the point trace event you've set is met during program execution, information on that is collected as trace data. For details on how to check trace data, see "2.13.6 Displaying an execution history".

When editing a trace event (access-related) you have set as a point trace event, first open the Events panel by selecting [View] menu >> [Event]. After selecting the trace event (access-related) displayed in the detailed information on the point trace event, click [Edit Condition ...] on the context menu. (See “2.17.4.2 Editing access-related events”.)

When deleting a trace event (access-related) you have set as a point trace event, first open the Events panel by selecting [View] menu >> [Event]. After selecting the trace event (access-related) you wish to delete in the detailed information on the point trace event in the Events panel, click ( ) button on the toolbar to delete it. (See “2.17 Event Management".)