AVR용 C-SPY의 중단점

기술노트 88367






2018-02-28 오전 1:51


There are different types of breakpoints in C-SPY that work differently. This Technical Note applies to IAR Embedded Workbench for AVR.

How are the breakpoints set?

Breakpoints are used by C-SPY to control the code execution.

Temporary breakpoints

When stepping in C or Assembler code, a number of temporary breakpoints are set (for all possible branches):

  • With “straight” code only one breakpoint is set, C-SPY will run then stop at the next statement.
  • An if statement gives two possible branches that require two breakpoints.
  • A function call requires one breakpoint. The placement depends on if “step-over” or “step in” is used.
  • Switch statement usually requires a number of breakpoints.

Fixed breakpoints

"Fixed breakpoints" are those set by the user or those set by C-SPY at certain fixed locations, CLIB getchar / putchar / exit, DLIB debugbreak (depending on project settings Options > Linker > Output > Format: With runtime control modules).

Are there variants of breakpoints when debugging on hardware?

When using hardware debugging (that is, not using the Simulator) there are two breakpoint variants: Hardware breakpoints and Software breakpoints.

Hardware Breakpoints

When the PC is equal to a certain address the chip will stop.

Software Breakpoints

A "break" instruction is set in the program.

There are a limited number of hardware breakpoints. Software breakpoints are only limited by the code memory size, but they are more expensive, as they can wear out the flash memory.

How are breakpoints used in XMEGA devices?

In Atmel XMEGA devices, there are usually very few hardware breakpoints available. Primarily they are used as "temporary breakpoints". When all the hardware breakpoints are used up, software breakpoints will be used.


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

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.