flash_firmware
Programs a compiled .elf or .axf firmware image onto an STM32 target, then resets and runs it by default. Set reset_run=false to flash only and halt for breakpoint setup.
Instructions
Flashes a compiled firmware binary to the target. Accepts GCC .elf or Keil .axf. By default it then resets and RUNS the firmware (Keil-style 'Load + Run'). Pass reset_run=false to flash only (e.g. to set breakpoints before the firmware starts). Refuses (elf_layout_unsupported) an image GDB would flash incompletely, such as a Keil ARMCC5 AXF whose RW initializer lies outside its segment; flash its fromelf BIN instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "flash_firmware"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session | No | Optional debug-session name. Omit for the default target. | |
| file_path | Yes | Absolute path to the compiled firmware file (e.g. .elf/.axf). | |
| reset_run | No | Reset and run after flashing (default true). False = flash only, leave halted. |