__setDataLogBreak
Syntax
__setDataLogBreak(variable,access, extend)
Parameters
variableA 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.
accessThe memory access type:
"R", for read,"W"for write, or"RW"for read/write.
extendUse 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 |
|
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);