This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Setting all 8 breakpoints

Hi everyone,

I am debugging an application on a STM32F4 in flash with a ULINK.
I read one of the features for the ULINK should be 8 breakpoints, but after the 6th breakpoint I get an error message.
Isn't it possible to use all 8 breakpoints?
Maybe can I use 8 breakpoints with another device?

Can you help me with this?

Warden

Parents
  • Breakpoints are normally registered in special debug cells in the processor you use, to allow the processor to run at full speed and break execution if the current address matches any of the debug cells.

    Using more breakpoints than the processor have hardware support for would require the flash memory to be reprogrammed to replace processor instructions with some instruction that will trig an exception. This would obviously only result in a simple code execution breakpoint, while the debug cells can have lots of nice configuration to only break on special accesses - such as writing a specific value, or break after n accesses.

    A good way to reduce the number of breakpoints needed is to let code call a potentially empty error function where you set a single breakpoint. The call stack can then tell from where the program execution came.

Reply
  • Breakpoints are normally registered in special debug cells in the processor you use, to allow the processor to run at full speed and break execution if the current address matches any of the debug cells.

    Using more breakpoints than the processor have hardware support for would require the flash memory to be reprogrammed to replace processor instructions with some instruction that will trig an exception. This would obviously only result in a simple code execution breakpoint, while the debug cells can have lots of nice configuration to only break on special accesses - such as writing a specific value, or break after n accesses.

    A good way to reduce the number of breakpoints needed is to let code call a potentially empty error function where you set a single breakpoint. The call stack can then tell from where the program execution came.

Children