How to add the watchpoint?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-21 2:27 AM
Dear All:
I am using the STM32cubeide,I want to toggle a watchpoint ,I choice a value,but can not triggle it:
So how can i toggle the watchpoint?
- Labels:
-
DEBUG
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-22 9:06 PM
At least this way: https://github.com/turboscrew/misc/blob/master/watchpoint.c :D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-10-28 8:23 PM
THANKS!​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-06 5:27 AM
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
- select Add Watch point
For 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:
