__hwRunToBreakpoint
Syntax
__hwRunToBreakpoint(breakpoint_address,timeout)
Parameters
breakpoint_addressThe address of the breakpoint to execute to, specified as an integer value (symbols cannot be used).
timeoutA time out for the breakpoint, specified in milliseconds. If the breakpoint is not reached within the specified time, the core will be halted.
Return value
Value | Result |
|---|---|
| Successful. The approximate execution time in ms until the breakpoint is hit. |
| Failed to set the breakpoint. |
| Failed to stop at the breakpoint before timeout. |
For use with
The C-SPY CMSIS-DAP driver.
The C-SPY I-jet driver.
The C-SPY J-Link/J-Trace driver.
The C-SPY PE micro driver.
The C-SPY ST-LINK driver.
The C-SPY TI XDS driver.
Description
Use this macro to set a temporary breakpoint and then start the execution. When the breakpoint is triggered, the execution stops. This macro can be used for running initialization code on the target system.
Example
__hwRunToBreakpoint(0x20000048,1000)
Sets a temporary breakpoint at the address 0x20000048, starts executing, and executes until the breakpoint is triggered or until 1000 milliseconds have passed.
Note
User-defined millisecond timeouts and delays are generated using the host operating system clock ticks. Because the host operating system is not a real-time OS, the actual delay or timeout will vary each time with approximately 5–20 ms.