Black Magic Probe Specific Configuration - Marus/cortex-debug GitHub Wiki

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",
    "type": "cortex-debug",
    "servertype": "bmp",
    "request": "attach",
    "cwd": "${workspaceRoot}",
    "executable": "${workspaceRoot}/build/blink2.elf", // replace with your executable
    "interface": "swd",
    "device": "STM32F103",
    "BMPGDBSerialPort": "/dev/cu.usbmodem4C99B0AB1", // Use whatever serial port makes sense for your OS and BMP setup
    "runToEntryPoint": "main",
},
{
    "name": "BMP Debug",
    "type": "cortex-debug",
    "servertype": "bmp",
    "request": "launch",
    "cwd": "${workspaceRoot}",
    "executable": "${workspaceRoot}/build/blink2.elf", // replace with your executable
    "preLaunchTask": "Build STM", // using stm32-for-vscode extension, this is the build task
    "interface": "swd",
    "device": "STM32F103",
    "BMPGDBSerialPort": "/dev/cu.usbmodem4C99B0AB1", // Use whatever serial port makes sense for your OS and BMP setup
    "runToEntryPoint": "main" // runToMain is deprecated.
}

powerOverBMP