Per Espressif-documented quirks you only have a few breakpoints (2 or 4). Can you remove all other breakpoints before attempting to place one in that method? If the template is screwing with it, maybe you can spealize the template function for the class or types you’re interested in so that it’s only being used by one class where you can breakpoint in?
As declared with the “ststm32” tag, I am not working with espressiv32, but with ststm32 (v 12.0.0; did pio update yesterday). The cpu is STM32F072RB.
As written in my post, I’ve set ONE SINGLE breakpoint. I even removed the default breakpoint at main() with the "debug_init_break = ". According to the reference manual, the CPU should provide four hardware breakpoints.
I use template parameters to define buffer lengths and GPIOs. I use them as a modern and type safe replacement for lines like “#define PIN_RST… #define BUFLEN…”. Imho, specialization is not a proper way to go here. Btw, I use only one single instance of the template and one single instance of the class in my code.
My bad, seeing “Connot insert hardware breakpoint” my mind was immediately on Espressif32 as that’s where it’s mainly occuring.
Try and start debugging again with the normal initial breakpoint. In the “Debug Console” you should be able to type in GDB commands. Per debug c++ template with gdb - Stack Overflow there are break and rbreak commands available. I’m not sure about the syntax, but you can try
Next debugging session
I tried to set the breakpoint to the same location by clicking with the on it in the IDE
—>success; works as expected!
Next debugging session:
Breakpoint 2 at 0x800338a: spilcd16.hpp:330. (6 locations)
Cannot insert hardware breakpoint 2.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.