cancel
Showing results for 
Search instead for 
Did you mean: 

How to add the watchpoint?

Raytheon
Associate II

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?

3 REPLIES 3
turboscrew
Senior III
Raytheon
Associate II

THANKS!​

PSoco.1
Associate III

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