Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__setDataLogBreak

In this section:
Syntax
__setDataLogBreak(variable, access, extend)
Parameters
variable

A string that defines the variable the breakpoint is set on, a variable of integer type with static storage duration. The microcontroller must also be able to access the variable with a single-instruction memory access, which means that you can only set data log breakpoints on 8, 16, and 32-bit variables.

access

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

extend

Use extended range: "TRUE" or "FALSE".

This parameter is only available when using a device and a debug probe that support SWO.

Return value

Result

Value

Successful

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

Unsuccessful

0

Table 55. __setDataLogBreak return values 


For use with

The C-SPY simulator. (Not available for all cores and devices.)

A device and a debug probe with support for SWO.

Description

Sets a data log breakpoint, that is, a breakpoint which is triggered when a specified variable is accessed. Note that a data log breakpoint does not stop the execution, it just generates a data log.

Example

For the simulator:

__var brk;
brk = __setDataLogBreak("MyVar",
"R");
...
__clearBreak(brk);

For the C-SPY I-jet driver:

__var brk;
brk = __seDataLogBreak("myVar", "RW", "FALSE");
...
__clearBreak(brk);
See also

Breakpoints and Getting started using data logging.