-
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging with blackmagicprobe crashes at start. #4932
Comments
Here is the init script https://github.com/platformio/platformio-core/blob/develop/platformio/debug/config/blackmagic.py Could you help us to debug this issue? |
Yes, I'll try to reproduce the failing setup... |
Hi. Sorry it took so long to return to this issue. So, I am still experiencing this problem, and cannot reproduce it when manually running GDB commands. Here is my GDB session with commands generated by pio: Details
After running initialization commands, I did |
What kind of issue is this?
If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Win 10 x64
PlatformIO Version (
platformio --version
): PlatformIO Core, version 6.1.15Description of problem
I've setup a project with STM32G030 MCU with blackmagicprobe used as debugger/uploader.
The MCU has been programmed and debugged fine for a month, but at some point I noticed that debugging fails right at the start.
The error in VSCode Debug console is
Uploading firmware via BMP from PlatformIO still works.
Uploading and debugging with stlink from PlatformIO also works fine.
I tried to use GDB to issue commands to BMP directly, and it seems to work fine. At least I was able to connect, select elf, reset, start/stop/step the program manually. Though I don't quite know what commands pio sends when debugging and what command causes the crash.
If I go back in git history, previous versions of my code can be debugged properly, so the problem shows for a combination of specific source + BMP + PlatformIO.
At the moment I would like to not disclose the source code unless absolutely necessary, and it could be tied to my specific BMP hardware/software version. So it will be hard to reproduce, so I am prepared to do some troubleshooting myself (I vaguely remember having GDB communication somewhere in vscode output tabs, but it's not there now. It would be rather useful for troubleshooting).
Steps to Reproduce
Actual Results
The code is compiled, uploaded, a debugging section is started, "current line" is highlighted in source code editor (it's in initial assembly code)
The error appears in vscode debugging console, no further debug actions are possible except killing the debug session.
Full output of vscode Debug console
The text was updated successfully, but these errors were encountered: