STM32duino + STM32F405RG on VESC bldc controller

Okay so it seems you’re using Linux. It’s indeed weird that debugging never works…

3.16V at a target of 3.3V seems a bit low – is the target board externally powered from a good power source and cable?

When attempting to debug, does it always fail after reading the wrong flash size?

If st-util and friends can read the flash size correctly, maybe you can use it as a debugging server like in
PIO unified debugger and sublimetext - #2 by krishna_chaitanya. For that, remove the old debug_tool = stlink and add

debug_tool = custom
debug_port = :4242
debug_server = <path to st-util binary>

It should also open a GDB server.

If there are problems with that, please post the output of running st-util alone or any other occuring error.

1 Like