2019-10-06 11:53 PM
Hey ST,
I've recently migrated to STM32CubeIDE as live variables tracking sounded very appealing to me.
Sadly this also has a (major) issue with debugging.
Let's say I had set a debug point at a certain line, 150 or so.
I think I removed it, afterwards if I run the debugger the program will run, but will consistently stop at 150.
I can verify this as I can pause it and see it being stuck there.
It will then say "handle_vCont_t, Thread already stopped".
The program will now not run, whether I use Resume, Step into or Step over.
The only way around this is to set a breakpoint before this and manually pass this line (instruction) with Step over.
This is incredibly annoying as I am trying to check timing with a logic analyzer.
I've tried some things, from using a different ST-LINK (V2 <> V3), to doing a clean all to creating and using a new debug configuration.
It seems as if there's a rogue breakpoint still there.
Any way around this?
I tried restarting STM32CubeIDE, but that didn't work.
Edit: The manual method doesn't work anymore :(
Edit2: OpenOCD works fine. But then I lose some tools...
2021-05-04 04:15 AM
Worked for me:
Switching to OpenOCD, then switching back to ST-LINK GDB server
2021-06-16 03:57 AM
Hello, can you please let me know the application you develop so that I can help to resolve this issue,
In my case, I was using a GPIO specific pin but there is some pin that is used for some alternate functionality so that information we can get from the manual.
So please check the GPIO pin used in your project if any.
Hope it helps you!
2021-08-10 01:42 AM
Hi,
Guess that the problem is that the breakpoint comparator registers (FPB) is not reset correctly between subsequent debug sessions. Probably some "ghost" breakpoints laying around! Noticed this on my H7 device but not on my L4.
Workaround:
Always pause execution before terminating the debug session since BPs disabled when halted.
Or
Clear the FPB comparators manually during debug startup by entering the following command to the "Initialization Commands" text-field (Startup tab) in the debug settings:
set {char[24]}(0xE0002008) = ""
Will clear the 6 BP registers on CM3/CM4. CM7 has 8 hw BPs (i think) so clearing 32 might be needed.
/Anders Jansson
2021-09-27 03:55 AM
Had the same problem, looks like the culprit was the Live Expressions... Go to Debug Configurations, under the Debugger tab, under Misc I just disabled the Live Expressions. Tadaah
2022-12-16 03:28 PM
I tried switching back and forth and it didn't help. But OpenOCD did say that the target had 6 breakpoints and 4 watchpoints. (Edit: I figured out since then that that doesn't mean how many are activated, but just what it is capable of) I just want to know where the watchpoint information is stored so I can blow it away without having to de-install and re-install the IDE.