I purchased the PIO debug capability about a month ago and have yet to get it to work.
I have Visual Code/PlatformIO running on Windows 7, and a project that compiles and runs using the STM32F446 board.
I open the debug window, set a break point in the source code window, and press the green arrow and it seems to compile the code and look like its working for a bit until I get an error that says:
Failed to launch GDB: .pioinit:10: Error in sourced command file:
Remote communication error. Target disconnected.: Success. (from interpeter-exec console
“source .pioinit”)
I can then either cancel or “Open launch.json”. If I open the json file I see this:
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
// PIO Unified Debugger
//
// Documentation: Redirecting...
// Configuration: Redirecting...
{
“version”: “0.2.0”,
“configurations”: [
{
“type”: “platformio-debug”,
“request”: “launch”,
“name”: “PIO Debug”,
“executable”: “c:/Users/Roger-Development/Documents/PlatformIO/Projects/Battery Management System/.pioenvs/nucleo_f446re/firmware.elf”,
“toolchainBinDir”: “C:/Users/Roger-Development/.platformio/packages/toolchain-gccarmnoneeabi/bin”,
“svdPath”: “C:/Users/Roger-Development/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd”,
“preLaunchTask”: {
“type”: “PlatformIO”,
“task”: “Pre-Debug”
},
“internalConsoleOptions”: “openOnSessionStart”
},
{
“type”: “platformio-debug”,
“request”: “launch”,
“name”: “PIO Debug (skip Pre-Debug)”,
“executable”: “c:/Users/Roger-Development/Documents/PlatformIO/Projects/Battery Management System/.pioenvs/nucleo_f446re/firmware.elf”,
“toolchainBinDir”: “C:/Users/Roger-Development/.platformio/packages/toolchain-gccarmnoneeabi/bin”,
“svdPath”: “C:/Users/Roger-Development/.platformio/platforms/ststm32/misc/svd/STM32F446x.svd”,
“internalConsoleOptions”: “openOnSessionStart”
}
]
}
I have absolutely no clue what to do from here. I have searched for others with the same problem but have not found anyone. It’s probably something simple but I’m not an expert in this environment. Most of the online help is just a drink from a firehose instead of simple things to look for.
Roger