Skip to content

Black Magic Probe Specific Configuration

Haneef Mohammed edited this page Apr 4, 2023 · 7 revisions

BMP support works not only for the USB serial port presented by the "classic" BMP, but also for a BMP built on an ESP32 WiFi platform, and for hosted builds (BMDA) too.

BMPGDBSerialPort

While the option mentions a SerialPort, the plug-in is just passing its value to a GDB launch as an argument.

This can also be the hostname and port offered by the ESP32 server or a hosted BMDA build.

A BMP-based launch.json configuration could look like this:

{
    "name": "BMP attach",
    "cwd": "${workspaceRoot}",
    "executable": "${workspaceRoot}/build/binaryToDebug.elf",
    "request": "attach",    // "launch" also works perhaps
    "type": "cortex-debug",
    "servertype": "bmp",
    "interface": "swd",
    "device": "STM32F407",
    "BMPGDBSerialPort": "espressif:2345",  // Use whatever serial port makes sense for your OS and BMP setup
    "runToEntryPoint": "main",
    "preLaunchCommands": [
        "set async-remote false",    // Not sure this is needed, but someone added it
        "set remote-timeout 20"      // Not sure this is needed either.
    ]
}

powerOverBMP