Monday, January 22nd 2018, 11:20am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

mfarnet

Beginner

Date of registration: Jun 5th 2008

Posts: 13

Location: Lenexa, KS

Occupation: Electrical Engineer

1

Wednesday, June 11th 2008, 5:45am

No Breakpoints running from flash

I'm not sure if this is a SAM-ICE question or an IAR issue, but When I choose the flash configuration of the sample files, I can not set breakpoints in the debugger window. Breakpoints can be set in the editor window prior to build, but not while debugging code running in flash.

Running from SRAM or DRAM, I can set breakpoints as usual, but when running from flash, I get a bing from the computer and no breakpoint set.

What is the reason for this? Is this an IAR thing, or an ARM thing, or a J-LINK thing? I can do this when running from flash on the AVR32 platform, but that's a different debugger.

Any insight would be appreciated.

Mike.

SEGGER - Rolf

Super Moderator

Date of registration: Nov 21st 2007

Posts: 65

2

Wednesday, June 11th 2008, 8:02am

Hello Mike,

an ARM7 has only 2 breakpoint units, so you can set only 2 breakpoints in flash.
It does that by programming the ICE-Breaker, using the 2 available hardware breakpoints.


Running from RAM, the debugger will simply replace the
instruction in RAM, which means it can replace any number of instruction and can set any
number of breakpoints.

The reason why you feel you can not set 2 breakpoints in flash is probably that IAR
uses one breakpoint for "Terminal I/O" and maybe one for the stack plug-in.
Both can be disabled.

If you have debugger software which allows reprogramming of the flash,
you can set as many breakpoints as you like in flash.
This is essential especially when debugging code running on a microcontroller
which does not even have enough flash to run the code in RAM.

For more info, see http://segger.com/jlink_arm_rdi_flashbp.html

--Rolf