Support for blackmagic probe

Hello, first off…
Love the new mbed integration!! :smiley:

I am having so much fun with the STM32 and mbed platform…
I have a small query, I would like to add support for different upload_protocols in platformio
While St-link is good enough, I would like to debug my code while running.
I have a Generic STM32F103 board turned into a black magic probe.

Presently, I am using platformio to build the code and manually using the BMP to upload and debug using a terminal. I would like to integrate it into the IDE itself. If @ivankravets can throw a couple of suggestions and pointers how to add a new upload_protocol I would love to work and contribute to the IDE.

Thanks!! :slight_smile:

Never mind!!
All it took was some good sleep and rest and some reading of the manual.
It all there… :slight_smile:
(Always RTFM !!!)

For those who might have the same requirements later, this is what you should do.

  1. Specify “upload_protocol=gdb” in the platformio.ini file.
  2. Create a “upload.gdb” file in your project directory and load the appropriate commands

Sample upload.gdb file

target extended-remote /dev/cu.usbmodemBFDEA5F1
monitor swdp_scan
attach 1
load
quit
yes

The section after the attach command is where you can play around for debugging. Those more knowledgeable than I can pitch in and suggest more appropriate commands, ideas or uses.

Thank you again platformio team.

1 Like