live_memory_start
Starts continuous background memory monitoring over SWD by polling selected variables at a set interval and writing results to JSONL for live inspection.
Instructions
Start continuous background memory monitoring via SWD.
Launches a persistent OpenOCD connection and polls the specified variables at the given interval. Results are written to a JSONL file and kept in a ring buffer accessible via live_memory_read. Variables can be edited while the session runs via live_memory_write.
IMPORTANT: Only one live_memory session per probe at a time. Stop any existing session before starting a new one. Stop live_memory before flashing or using stm32_read_memory/stm32_write_memory.
Args: variables: JSON array of variables to monitor. Elements can be: - String: plain symbol ("blink") or C path with dots/indices ("g_app.dosing.cfg.pid_kp", "tasks[2].lastRunMs"), resolved from the ELF. Structs (size > 4 bytes) are auto-expanded into individual fields with dotted names; prefer a sub-struct like "g_app.dosing" over a huge root ("g_app") to keep the poll fast. - Dict with "symbol": {"symbol": "temp", "type": "float"} Add "expand": false to disable struct auto-expansion. - Dict with "address": {"address": "0x20000304", "name": "x", "width": 32} elf_path: Path to .elf file for symbol resolution. probe: Board nickname, probe nickname, or ST-Link SN. Empty auto-selects the only connected board. interval_ms: Polling interval in milliseconds (minimum 250). output_path: JSONL output file path. Default: /tmp/live_memory_.jsonl
Returns: Session ID, output path, and resolved variable list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| probe | No | ||
| elf_path | No | ||
| variables | Yes | ||
| interval_ms | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |