dbgprobe.flash
Program firmware images (.hex, .elf, .bin) to embedded targets with optional verify and reset. Supports session-based or direct J-Link flash.
Instructions
Program a firmware image to the target. Supports .hex, .elf (address auto-detected) and raw .bin (requires explicit addr). Optionally verify and reset after flashing. If session_id is provided, tears down GDB, flashes, and restarts (preferred). Without session_id, uses JLinkExe directly (session-less, no debug session needed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addr | No | Base address for .bin files (e.g. 0x08000000 or "0x8000000"). Not needed for .hex/.elf. | |
| path | Yes | Path to firmware file (.hex, .elf, .bin). | |
| device | No | Target device string (e.g. nRF52840_xxAA). Only for session-less flash. | |
| verify | No | Verify after programming (default: true). | |
| backend | No | Backend to use (default from DBGPROBE_BACKEND env var). Only for session-less flash. | |
| probe_id | No | Serial number of the probe. Only for session-less flash. | |
| interface | No | Debug interface (default from DBGPROBE_INTERFACE). Only for session-less flash. | |
| speed_khz | No | Interface speed in kHz (default from DBGPROBE_SPEED_KHZ). Only for session-less flash. | |
| session_id | No | Session ID for session-based flash (preferred). Omit for session-less flash. | |
| reset_after | No | Reset and run after programming (default: true). |