Skip to main content
Raytheon
Associate II
October 21, 2019
Question

How to add the watchpoint?

  • October 21, 2019
  • 3 replies
  • 8561 views

Dear All:

I am using the STM32cubeide,I want to toggle a watchpoint ,I choice a value,but can not triggle it:0690X00000AqbG5QAJ.jpg

So how can i toggle the watchpoint?

This topic has been closed for replies.

3 replies

turboscrew
Senior III
October 23, 2019
Raytheon
RaytheonAuthor
Associate II
October 29, 2019

THANKS!​

PSoco.1
Associate II
September 6, 2021

Hi,

I don't want to revive this, but I have found how STM32CubeIDE supports watchpoints, that is, the execution stops as you were executing a breakpoint when some data is accessed by the CPU during the execution of the program, hope this helps:

  • run in debugger mode
  • pause the execution
  • add an expression in expression view, for example the name of your variable, if the expression works you see the current value of the variable
  • right click on the row

0693W00000DmIlsQAF.png 

  • select Add Watch point

0693W00000DmImBQAV.pngFor obvious reasons it does not work out of the box with auto variables (memory located in stack) as its location may change continuously.

you can use a raw address like this: *((int*)0x20000c1c), as long it can be evaluated and points to a valid address, I recommend use variable names, unless you know what you are doing

Once a valid expresion is set, in breakpoint tab you will see the watchpoint, for enable/disable/delete:

0693W00000DmIqIQAV.png