Skip to content

Black Magic Probe Specific Configuration

Jonathan Klimt edited this page Jun 6, 2022 · 7 revisions

BMPGDBSerialPort

This works not only for the USB serial port presented by the "classic" BMP, but also for a BMP built on an ESP32 WiFi platform.

It turns out that while the option contains the name "SerialPort" the script is just passing this into a GDB launch as an argument.

This can also be the hostname and port offered by the ESP32 server, which is configured as a DHCP client hostname=espressif, gdb port=2345 on my home LAN.

This is a fragment of the launch.json

{
    "name": "BMP attach",
    "cwd": "${workspaceRoot}",
    "executable": "${workspaceRoot}/build/binaryToDebug.elf",
    "request": "attach",
    "type": "cortex-debug",
    "servertype": "bmp",
    "interface": "swd",
    "device": "STM32F407",
    "BMPGDBSerialPort": "espressif:2345",
    "runToMain": true,
    "preLaunchCommands": [
        "set async-remote false",
        "set remote-timeout 20"
    ],
    "preRestartCommands": [
        "enable breakpoint",
        "break main"
    ]
}

powerOverBMP