Trying to in-circuit debug BluePill program in VSCode 1.76.2 with PlatformIO

Development environment specific, Arduino, Eclipse, VS2013, Em::Blocks etc
Post Reply
Piter_de_Vries
Posts: 14
Joined: Sat Sep 17, 2022 4:12 pm

Trying to in-circuit debug BluePill program in VSCode 1.76.2 with PlatformIO

Post by Piter_de_Vries »

I want to do in-circuit debugging of my BluePill program with an STLink v2 dongle in VSCode but I don't think it's working. I can't enter debugging mode unless Boot 0 is set to 1. If Boot 0 is set to 0, then I get this error when I click on Start Debugging:

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

Image

If I set Boot 0 to 1 and click on Start Debugging, then it appears that the code compiles, uploads and enters debugging mode but the variables I'm watching don't seem to change. To check, I added a counter which is meant to increment every time the main loop finishes but value seems to start at 64 and stay there.

Also, when debugging starts, VScode opens this file: C:\Users\piter\.platformio\packages\framework-arduinoststm32\variants\STM32F1xx\F103C8T_F103CB(T-U)\startup_M200_f103xb.S

Image

I posted the entirety of my program here: https://pastebin.com/U0UXywP2

I'd appreciate any insight into what's going wrong for me. Thanks in advance.

Version: 1.76.2 (user setup)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:55:54.936Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No
Post Reply

Return to “IDE's”