Skip to main content

IAR Embedded Workbench for RH850 3.20.x

Setting breakpoints using system macros

In this section:

You can set breakpoints not only in the breakpoint dialog box, but also by using built-in C-SPY system macros. When you use system macros for setting breakpoints, the breakpoint characteristics are specified as macro parameters.

Macros are useful when you have already specified your breakpoints so that they fully meet your requirements. You can define your breakpoints in a macro file, using built-in system macros, and execute the file at C-SPY startup. The breakpoints will then be set automatically each time you start C-SPY. Another advantage is that the debug session will be documented, and that several engineers involved in the development project can share the macro files.

Note

If you use system macros for setting breakpoints, you can still view and modify them in the Breakpoints window. In contrast to using the dialog box for defining breakpoints, all breakpoints that are defined using system macros are removed when you exit the debug session.

C-SPY macro for breakpoints

Simulator

E1/E2/E20

__setCodeBreak

Yes

Yes

__setDataBreak

Yes

Yes

__setLogBreak

Yes

Yes

__setDataLogBreak

Yes

__setSimBreak

Yes

__setTimerStartBreak

Yes

__setTimerStopBreak

Yes

__setTraceStartBreak

Yes

Yes

__setTraceStopBreak

Yes

Yes

__clearBreak

Yes

Yes

Table 18. C-SPY macros for breakpoints  


For information about each breakpoint macro, see Reference information on C-SPY system macros.

Setting breakpoints at C-SPY startup using a setup macro file

You can use a setup macro file to define breakpoints at C-SPY startup. Follow the procedure described in Using C-SPY macros.