PlatformIO Community

Failed to launch GDB error

I am facing an issue with the debugger when I start debugging my code. To keep it simple, I am running a “hello world” program and am facing the following error:

Failed to launch GDB: .pioinit:13: Error in sourced command file:
Remote communication error. Target disconnected.: Success. (from interpreter-exec console “source .pioinit”)

I have tried reinstalling both VSCode and PlatformIO and also uninstalled the existing GCC compilers on my system. The build does not fail but it gives an error in the debug console. I have attached images for your reference. I tried running the same code on a different system and it worked.

Please let me know what I should try to do to fix this.

platformio.ini →
platform = ststm32
board = disco_f429zi
framework = mbed

What is the output in the “Debug Console” tab in VSCode after you have started the debug session?


Update: Solved
It had something to do with the drivers on Windows. I downloaded the official driver zip file from the ST-LINK website and updated my driver through Device Manager on windows and it worked!

Driver link:

1 Like