1

I have been trying to debug my code and realized that my watchpoints for variable never execute. When I looked into this problem online, I encountered similar situations and the response they received was their microcontroller may not be supported. I have an STM32F4 and I am using GDB on Ubuntu with st-util. Breakpoints currently work but watchpoints don't. How can I add support for it?

h3y4w
  • 47
  • 8
  • 2
    Watch points should be supported with stlink and STM32F4. Have you tried using another GDB server, like OpenOCD? – Tony K Jul 03 '17 at 04:09
  • Also note that the C/C++ code in question may have been optimized out or inlined, so the debugger was not able to find it. Try compiling with -Og -g3 which optimizes for debug and includes extra debug info. – Tony K Jul 03 '17 at 04:12
  • @TonyK I haven't tried using OpenOCD. I will make sure to try that. I added both those options for compiling but with no prevail. I also tried using st-util v2. – h3y4w Jul 03 '17 at 11:33
  • @TonyK Using OpenOCD seems to have worked. If you make an answer I will be glad to accept it. Thanks again! – h3y4w Jul 03 '17 at 11:59

1 Answers1

2

It seems that st-until has issue with setting watchpoints on STM32F4, even though it is supposed to be supported. As I previously noted, OpenOCD is an alternative and it looks like switching to it has resolved the issue for you.

Tony K
  • 309
  • 1
  • 5