4.8.3 General Information on Data Breakpoint
- Data Breakpoint can be edited/added only in debug mode
- Local variables must always be qualified with the
function name, which is also the case if the user wants to add a variable from the
function that the program has stopped in
Data breakpoints on local variables can result in false hits due to the reuse of stack memory.
Tip:Declare local variables as static and provide the static variable's address in the location field. The address of the static variable is fixed during compilation/linking.
- Global variables are initialized with default values during the start-up. The valid data breakpoint for global variables will hit in the disassembly or initialization code during the start-up.
- There can be several instructions to perform read/write data for a variable. E.g., the 'int' data type can have two individual bytes read/write instructions, so the data breakpoint hits twice for the same variable.
- Data breakpoint event can occur when the bus access happens for the specific address
- Maximum number of data breakpoint supported (This
may vary based on specific device/family. Refer to the device specific data sheet.):
Most of the devices conform to the above limits.
Architecture Maximum Data Breakpoint Supported ATmega - Two without Data Mask (OR)
- One without Data Mask and one with Data Mask
XMEGA - Two without Data Mask (OR)
- One without Data Mask and one with Data Mask (OR)
- Two with Data Mask
UC3 - Two without Data Mask (OR)
- One without Data Mask and one with Data Mask (OR)
- Two with Data Mask
SAM Device dependent. Refer to the device specific data sheet. Tiny Does not support data breakpoint
Note: ATmega and SAM devices use multiple hardware
resources when a data breakpoint with a data mask is set. Hence, using a data mask
can reduce the number of data breakpoints to be set.