Everything
2.8.5.1 Set a break event (access type)

Use one of the following methods to set a break event (access type) that stops programs with the access to a variable/SFR.

Caution 1.

Also see "2.15.7 Notes for setting events" for details on breakpoints (e.g. limits on the number of enabled events).

Caution 2.

For other than [Simulator]
The access break events described here cannot be set for 32-bit (4-byte) variables.
Additionally, accessing a single byte of a 16-bit (2-byte) variable will not be detected as an access.

(1)

Set a break event to a variable/SFR in the Editor panel/Disassemble panel

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

Follow the operation listed below from the context menu, in accordance with your desired access type, after selecting an arbitrary variable or SFR on the source text/disassembled text. Note, however, that only global variables, static variables inside functions, and file-internal static variables can be used.

Access Type

Operation

Read

Select [Break Settings] >> [Set Read Break to]/[Set Read Combination Break to]Note, and then press the [Enter] key.

Write

Select [Break Settings] >> [Set Write Break to]/[Set Write Combination Break to]Note, and then press the [Enter] key.

Read/Write

Select [Break Settings] >> [Set R/W Break to]/[Set R/W Combination Break to]Note, and then press the [Enter] key.

Note

[E1][E20]
A combined break event, that is, a break condition that is a combination of multiple break events, may be set as the target event condition on the E1 and E20 (see "2.15.4.3 Edit combination conditions of events [E1] [E20]").
Note, however, that this function is enabled only when the selected microcontroller supports a combination break event.

 

At this time, if you have specified a value in the text box in the context menu, break will occur only when the specified value is used for the reading, writing or reading/writing. On the other hand, if no value is specified, reading., writing or reading/writing the selected variable by any value will cause the break to occur.

Caution 1.

Variables within the current scope can be specified.

Caution 2.

Variables or SFR at lines that have no valid addresses cannot be used for break events.

Figure 2.88

Example of Setting Break Event (Access Type) on Variable in Editor Panel

Figure 2.89

Example of Setting Combination Break Event (Access Type) on Variable in Editor Panel [E1][E20]

(2)

Set a break event (access type) to a registered watch-expression

You can set break events in the Watch panel.

Follow the operation listed below from the context menu, in accordance with your desired access type, after selecting the registered watch-expression (multiple selections not allowed).

Note, however, that only global variables, static variables inside functions, file-internal static variables, and SFR can be used.

Access Type

Operation

Read

Select [Access Break] >> [Set Read Break to]/[Set Read Combination Break to]Note, and then press the [Enter] key.

Write

Select [Access Break] >> [Set Write Break to]/[Set Write Combination Break to]Note, and then press the [Enter] key.

Read/Write

Select [Access Break] >> [Set R/W Break to]/[Set R/W Combination Break to]Note, and then press the [Enter] key.

Note

[E1][E20]
A combined break event, that is, a break condition that is a combination of multiple break events, may be set as the target event condition on the E1 and E20 (see ”2.15.4.3 Edit combination conditions of events [E1] [E20]”).
Note, however, that this function is enabled only when the selected microcontroller supports a combination break event.

 

At this time, if you have specified a value in the text box in the context menu, break will occur only when the specified value is used for the reading., writing or reading/writing. On the other hand, if no value is specified, reading., writing or reading/writing the selected watch-expression by any value will cause the break to occur.

Caution

A watch-expression within the current scope can be specified.
To target a watch-expression outside the current scope, select a watch-expression with a specified scope.

Figure 2.90

Example of Setting Hardware Break Event (Access Type) on Watch-Expression

Figure 2.91

Example of Setting Combination Break Event (Access Type) on Watch-Expression [E1][E20]

 

When you have performed the above operation, the set break event (access type) is managed in the Events panel as a Hardware Break event (access type) or a execution-related event in the detailed information on a Combination Break event (see "2.15 Manage Events" for details).

Figure 2.92

Example of Setting Hardware Break Event (Access Type) in Events Panel

Figure 2.93

Example of Setting Combination Break Event (Access Type) in Events Panel [E1][E20]