dbgprobe.erase
Erase target flash memory completely or a specified range. Full chip erase unlocks secured devices; range erase targets specific addresses. Supports session-based or direct JLinkExe invocation.
Instructions
Erase target flash. With no address params: full chip erase (unlocks secured/read-protected devices like Nordic APPROTECT). With start_addr and end_addr: erase only that range. If session_id is provided, erases through the active GDB session (preferred — no USB contention). Without session_id, uses JLinkExe directly (for session-less erase, e.g. unlocking a secured device before connect).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Target device string (e.g. nRF52840_xxAA). Only for session-less erase. | |
| backend | No | Backend to use (default from DBGPROBE_BACKEND env var). Only for session-less erase. | |
| end_addr | No | End address for range erase (e.g. 0x00080000 or "0x80000"). Required if start_addr is set. | |
| probe_id | No | Serial number of the probe. Only for session-less erase. | |
| interface | No | Debug interface (default from DBGPROBE_INTERFACE). Only for session-less erase. | |
| speed_khz | No | Interface speed in kHz (default from DBGPROBE_SPEED_KHZ). Only for session-less erase. | |
| session_id | No | Session ID for session-based erase (preferred). Omit for session-less erase. | |
| start_addr | No | Start address for range erase (e.g. 0x00040000 or "0x40000"). Omit for full chip erase. |