Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__hwRunToBreakpoint

In this section:
Syntax
__hwRunToBreakpoint(breakpoint_address, timeout)
Parameters
breakpoint_address

The address of the breakpoint to execute to, specified as an integer value (symbols cannot be used).

timeout

A 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

>=0

Successful. The approximate execution time in ms until the breakpoint is hit.

-1

Failed to set the breakpoint.

-2

Failed to stop at the breakpoint before timeout.

Table 42. __hwRunToBreakpoint return values  


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.