Connect a debug session
debug_connectStart an STM32 debug session in one step: load the ELF file, spawn the GDB server, and connect to the ST-LINK target.
Instructions
Starts a debug session: spawns ST-LINK_gdbserver and arm-none-eabi-gdb (MI2), loads ELF symbols, and connects via target extended-remote.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apId | No | Access port ID, for multi-core devices (default: 0) | |
| device | No | MCU device, e.g. STM32G431CBTx (default: STM32G431CBTx) | |
| serial | No | ST-LINK serial number; omit to auto-select if exactly one probe is attached | |
| elfPath | Yes | Path to the .elf file with debug symbols to load | |
| interface | No | default: swd | |
| frequencyKhz | No | SWD/JTAG frequency in kHz (default: 4000) | |
| haltOnConnect | No | Keep the core halted after connecting (default: true) |