How to build, debug and run code for STM32 F401RE - in VS Code


I am using the STM32 F401RE microcontroller board and I have PlatformIO installed in VS Code. I want to upload and run my code in Platform IO, as well as debug. I followed various tutorials (for example: ST Nucleo F401RE — PlatformIO latest documentation). I’m running into the an error when I try to debug my code (photo attached) saying “Failed to launch GDB”. I installed the ST Link USB drivers (STSW-LINK009 - ST-LINK, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 USB driver signed for Windows7, Windows8, Windows10 - STMicroelectronics), but I don’t know where to include them in my projects. Could you please help me in getting the drivers to work with PlatformIO?

Thank you very much!

See tutorials Tutorials and Examples — PlatformIO latest documentation

Does uploading work?