Skip to main content

IAR Embedded Workbench for RX 5.20

Breakpoints in the C-SPY hardware debugger drivers

In this section:

Using the C-SPY drivers for hardware debugger systems you can set various breakpoint types. The amount of breakpoints you can set depends on the number of hardware breakpoints available on the target system. If no hardware breakpoints are available, software breakpoints will be used.

This table summarizes the characteristics of breakpoints for the different target systems:

C-SPY hardware driver

Software code breakpoints

Hardware code and Log breakpoints

Trace breakpoints

Data breakpoints

E1/E2/E20/E2 Lite/EZ-CUBE2

using 12 hardware breakpoints*

256

Up to 8†

Up to 8†

Up to 4*

J-Link

using 12 hardware breakpoints*

256

Up to 8†

Up to 8†

Up to 4*

Table 21. Available breakpoints in C-SPY hardware debugger drivers  


* The number of available breakpoints depends on the target system you are using.

† These 8 breakpoint resources are shared between three types of breakpoints.

Hardware breakpoints in the RX emulators share the same resources. There is a total of 12 of these breakpoint events, divided into 8 that are triggered by a program counter access and 4 that are triggered by a data access.

The software code breakpoints use a mechanism that writes to the memory with a BRK instruction, and when a breakpoint is triggered the original instruction is written back to the memory. This makes it possible to use the breakpoint for code in RAM, but if used for code in flash memory the execution is slowed down by the need to reprogram the memory. There are up to 256 software code breakpoints.

The debugger will first use any available hardware breakpoints before using software breakpoints.