Skip to main content

IAR Embedded Workbench for RL78 5.20

__setSimBreak

In this section:
Syntax
__setSimBreak(location, access, action)
Parameters
location

A string that defines the data location of the breakpoint, either a valid C-SPY expression whose value evaluates to a valid address or an absolute location. For information about the location types, see Enter Location dialog box.

access

The memory access type: "R" for read or "W" for write.

action

An expression, typically a call to a macro, which is evaluated when the breakpoint is detected.

Return value

Result

Value

Successful

An unsigned integer uniquely identifying the breakpoint. This value must be used to clear the breakpoint.

Unsuccessful

0

Table 44. __setSimBreak return values 


For use with

The C-SPY simulator.

Description

Use this system macro to set immediate breakpoints, which will halt instruction execution only temporarily. This allows a C-SPY macro function to be called when the processor is about to read data from a location or immediately after it has written data. Instruction execution will resume after the action.

This type of breakpoint is useful for simulating memory-mapped devices of various kinds (for instance serial ports and timers). When the processor reads at a memory-mapped location, a C-SPY macro function can intervene and supply the appropriate data. Conversely, when the processor writes to a memory-mapped location, a C-SPY macro function can act on the value that was written.