Incorrect checksum when debugging

Technical Note 48021

Arkitekturer:

All

Komponent:

debugger

Uppdaterad:

2015-11-06 10:41

Introduction

When a software breakpoint is set, a Break instruction will be set in flash memory. This will make a checksum calculation over that memory range fail.

Solution

Hardware breakpoints or no breakpoints at all should be used if debugging checksum algorithms.

To get control of the usage of the hardware breakpoints check Technical Note 31070.

Specifics for different devices

Atmel AVR devices

  • In Xmega devices, software breakpoints are regularly used. This makes it impossible to calculate a correct checksum in debug mode.
  • DebugWIRE only has software breakpoints. You can not debug checksum algoritms for devices that use debugWIRE.

Specifics for some debug probes

Using J-Link in IAR Embedded Workbench for ARM

The J-Link driver can set 'flash breakpoints', and those must be disabled.
When the J-Link Control Panel is open (for example when debugging) the flash breakpoints can be disabled at : Settings > Flash breakpoints.

Using a FET-probe in IAR Embedded Workbench for MSP430

IAR Embedded Workbench for MSP430 version 5.51 (and newer) has flash breakpoints enabled by default. (So if all hardware breakpoints are in use, then this type of problem can occur).

 

All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.