Skip to content

Support for BMDA (Blackmagic Debug Application) #1133

@mubes

Description

@mubes

cortex-debug has great support for bmp, but not for BMDA (the blackmagic application running on a host PC and connecting to an arbitrary probe). Adding this would allow cortex-debug to work with any probe that BMDA supports including ftdi, ORBTrace, cmsis-dap etc etc.

BMDA works perfectly when started outside vscode and connected to a fake serial port, e.g.;

    blackmagic &
    sleep 0.1
    socat pty,link=/tmp/bmp,raw,echo=0 tcp:localhost:2000

...with the bmp driver pointed to this device. It would be great if BMDA were supported directly. This needs the following changes;

  • Explicitly run blackmagic when the debug session starts with any command line parameters
  • Connect to tcp://localhost:xxxx/ where xxxx is the port number blackmagic gives when it starts

From that point on behavior is exactly the same as the bmp debug probe, except that at the end of the session you'll need to terminate blackmagic.

At the moment I'm doing this with the socat structure above, but it'll be much more convinient for users if they can just use BMDA directly, and the changes required to support it are minimal (basically, a different startup, and explicit closedown, for the driver).

Testing can be performed using any CMSIS-DAP adaptor which will be detected automatically. Command line options support probe selection when multiple probes are present.

The full set of configuration options for BMDA can be obtained by running blackmagic -h, but to be exhaustive its probably easier just to support command line options as a configuration setting.

(Thanks a lot for cortex-debug, your efforts are greatly appreciated!!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions