Setting breakpoints using system macros
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 | I-jet | J-Link/J-Trace | CMSIS-DAP | CADI | E2 |
|---|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
__ | Yes | Yes | — | Yes | — | — |
__ | Yes | Yes | Yes | Yes | — | Yes |
__ | Yes1 | Yes | — | — | — | — |
__ | Yes1 | — | — | — | — | — |
__ | Yes1 | Yes | — | — | — | — |
__ | Yes1 | Yes | — | — | — | — |
__ | Yes1 | Yes | Yes | Yes | Yes | Yes |
1. Not for all cores and devices.
C-SPY macro for breakpoints | GDB Server | ST-LINK and TI MSP-FET | PE micro | TI Stellaris / TI XDS | Nu-Link | G+Link |
|---|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
__ | — | — | — | — | — | Yes |
__ | Yes | Yes | Yes | Yes | Yes | Yes |
__ | — | — | — | — | — | — |
__ | — | — | — | — | — | — |
__ | — | — | — | — | — | — |
__ | — | — | — | — | — | — |
__ | Yes | Yes | Yes | Yes | Yes | Yes |
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.