__setDataBreak
Syntax
In the simulator:
__setDataBreak(location, count, condition, cond_type, access, action)In the C-SPY I-jet driver and in the C-SPY CMSIS-DAP driver:
__setDataBreak(location, access, extend, match, data, mask)Parameters
locationA 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.
countAn integer that specifies the number of times that a breakpoint condition must be fulfilled before a break occurs the next time.
This parameter only applies to the simulator.
conditionThe breakpoint condition (string).
This parameter only applies to the simulator.
cond_typeThe condition type; either
"CHANGED"or"TRUE"(string).This parameter only applies to the simulator.
accessThe memory access type:
"R", for read,"W"for write, or"RW"for read/write.
actionAn expression, typically a call to a macro, which is evaluated when the breakpoint is detected.
This parameter only applies to the simulator.
extendExtends the breakpoint so that a whole data structure is covered. For data structures that do not fit the size of the possible breakpoint ranges supplied by the hardware breakpoint unit, for example three bytes, the breakpoint range will not cover the whole data structure. Note that the breakpoint range will be extended beyond the size of the data structure, which might cause false triggers at adjacent data. Choose between
"TRUE"or"FALSE".This parameter only applies to the C-SPY I-jet driver and the C-SPY CMSIS-DAP driver.
matchEnables matching of the accessed data. Choose between
"TRUE"or"FALSE".This parameter only applies to the C-SPY I-jet driver and the C-SPY CMSIS-DAP driver.
dataA data value to match, in unsigned 32-bit format.
This parameter only applies to the C-SPY I-jet driver and the C-SPY CMSIS-DAP driver.
maskSpecifies which part of the data value to match—word, halfword, or byte—in unsigned 32-bit format.
This parameter only applies to the C-SPY I-jet driver and the C-SPY CMSIS-DAP driver
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.
The C-SPY CMSIS-DAP driver.
The C-SPY GDB Server driver.
The C-SPY G+LINK driver.
The C-SPY I-jet driver.
The C-SPY J-Link driver.
The C-SPY PE micro driver.
The C-SPY ST-Link driver.
The C-SPY TI MSP-FET driver.
The C-SPY TI Stellaris driver.
The C-SPY TI XDS driver.
Description
Sets a data breakpoint, that is, a breakpoint which is triggered directly after the processor has read or written data at the specified location.
Example
For the C-SPY simulator:
__var brk; brk = __setDataBreak(":0x4710", 3, "d>6", "TRUE","W", "ActionData()");... __clearBreak(brk);
For I-jet:
__var brk;
brk = __setDataBreak("myVar", "W", "FALSE", "TRUE",
0xABCD, 0xFFFF);
...
__clearBreak(brk);