{"at":"2026-11-23T05:28:55.811Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:28:56.871Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"stlink-mcp","version":"0.9.0"}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"stlink-mcp drives STM32 boards through an ST-LINK probe with ST's STM32CubeCLT tools.\n\nEvery result has a status. verified: verified_by says what was observed. unverified: it may have worked, but nothing checked it, and unverified_because says why; this is not success. failed: error says why. Read the status before the values.\n\nA usual session: `list_probes`, then `board_state` to identify the board. `run_firmware` loads an ELF linked for RAM and starts it; a build linked for flash, the default from STM32CubeIDE and CubeMX, goes `flash_firmware`, then `reset_target`, then `capture_console`. Without halting the program: `capture_console`, `capture_swo`, `sample_values`, `read_memory`, `read_fault_status`, `read_option_bytes` and `disassemble`. Halting it: `run_until`, `core_registers` and `locate_fault`. `reset_target` restarts it; `release_probe` when done.\n\nGive `probe_serial` on every call: without it each call first lists the probes, which takes a second or more and holds up every other board. Give addresses as \"0x...\" strings and files as absolute paths. `run_firmware` lets go of the probe once the program starts; with `keep_probe=True` a GDB server keeps holding it, and while it does, a core that locks up is reset, which clears its fault registers. `reset_target` and `flash_firmware` stop a holding server first and say so. A call that halts or resets the target says so. If the running program has closed the debug port, `board_state` can get back in by resetting the target, and `reset_target` cannot; on an STM32N6 running ST's start-up code, only a power cycle does. An unknown argument is refused, not ignored.\n","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T05:28:56.871Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:28:56.873Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"stlink-mcp","version":"0.9.0"}},"cacheScope":"private","resultType":"complete","tools":[{"description":"List every attached ST-LINK with its firmware, board name, serial console and\nwhether a GDB server holds it. Use the console mapping rather than the order of\n/dev/ttyACM*, which does not follow the probes. Listing takes about a second,\nand often much longer while a GDB server holds a probe, which is why the other\ntools should be given `probe_serial`.\n    ","inputSchema":{"properties":{},"title":"list_probesArguments","type":"object"},"name":"list_probes","outputSchema":{"additionalProperties":true,"title":"list_probesDictOutput","type":"object"}},{"description":"Identify the target, the probe and its family, and say whether the core is\nrunning, sleeping, halted or locked up, from program-counter samples read\nwithout halting it; given `elf_path`, where in the source they fall. If the\ncore cannot be reached as it runs, reconnects through a reset, which restarts\nthe program and can get past a debug port the program closed; `target_was_reset` says\nso. Never resets beside a GDB server holding the probe. `family.provenance`\nsays which values were measured.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"board_stateArguments","type":"object"},"name":"board_state","outputSchema":{"additionalProperties":true,"title":"board_stateDictOutput","type":"object"}},{"description":"Reset the target, load an ELF into its RAM, start it, and verify that it\nstarted: by its board's console output, or else by program-counter samples\ninside the image. Refuses an image not linked for RAM: vector table at\nboard_state's `vector_table_addr`, every segment within 0x20000000-0x3FFFFFFF.\nLets go of the probe once the program starts; `keep_probe=True` keeps a GDB\nserver holding it, and a core that then locks up is reset, clearing its fault\nregisters. No signing.\n    ","inputSchema":{"properties":{"console_seconds":{"default":3.0,"title":"Console Seconds","type":"number"},"elf_path":{"title":"Elf Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"keep_probe":{"default":false,"title":"Keep Probe","type":"boolean"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"required":["elf_path"],"title":"run_firmwareArguments","type":"object"},"name":"run_firmware","outputSchema":{"additionalProperties":true,"title":"run_firmwareDictOutput","type":"object"}},{"description":"Stop the GDB server holding a probe; with no serial, every probe's. Resumes a\ncore run_until left halted. While held, the reading tools work beside the\nserver, but a core that locks up is reset, clearing its fault registers. A\nprogram that closes the debug port closes it held or not; board_state then gets\nback in through a reset, restarting the program, except on an STM32N6 running\nST's start-up code, which needs a power cycle. `unverified` if nothing was held.\n    ","inputSchema":{"properties":{"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"release_probeArguments","type":"object"},"name":"release_probe","outputSchema":{"additionalProperties":true,"title":"release_probeDictOutput","type":"object"}},{"description":"Program an image into flash: a raw .bin at `address` or at a measured flash\nbase, or an ELF or HEX file at its own addresses, inside the part's flash; on a\nbase from ST's database or a board file, only inside the main-flash window; the\nresult names the base's provenance. Verified only when every byte reads back\nthe same. Does not sign or start the image; `next_step` says how it boots.\nPrefer run_firmware while developing.\n    ","inputSchema":{"properties":{"address":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"title":"Address"},"image_path":{"title":"Image Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"required":["image_path"],"title":"flash_firmwareArguments","type":"object"},"name":"flash_firmware","outputSchema":{"additionalProperties":true,"title":"flash_firmwareDictOutput","type":"object"}},{"description":"Read target memory without halting or resetting it, given one of: `address`\n(an integer or a \"0x...\" string, 4-byte aligned, `length_bytes` a multiple of\n4, at most 1024); `symbol`, a variable decoded with the types in `elf_path`; or\n`register`, such as \"RCC.CR\", decoded from ST's SVD file for the part (`svd`\npicks one). Refuses a register whose read changes state,\nsuch as a UART's data register, unless `read_effects_ok`. Refuses rather than\nreset at a closed debug port.\n    ","inputSchema":{"properties":{"address":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"title":"Address"},"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"length_bytes":{"default":32,"title":"Length Bytes","type":"integer"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"read_effects_ok":{"default":false,"title":"Read Effects Ok","type":"boolean"},"register":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Register"},"svd":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Svd"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Symbol"}},"title":"read_memoryArguments","type":"object"},"name":"read_memory","outputSchema":{"additionalProperties":true,"title":"read_memoryDictOutput","type":"object"}},{"description":"Sample values while the program runs, without halting or resetting it: `what`\nlists variables (decoded with `elf_path`'s types; \"g_state.mode\" picks a\nmember), \"0x...\" word addresses, or registers such as \"ADC3.ISR\" (`svd` and\n`read_effects_ok` as in read_memory). All are read together, a few times a\nsecond, for `seconds` (at most 60), with the core's state; each comes back with\nfirst, last, range and changes. `until`, such as \"g_state.mode == MODE_RUN\" or\n\"g_ticks changes\", stops early.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"read_effects_ok":{"default":false,"title":"Read Effects Ok","type":"boolean"},"seconds":{"default":5.0,"title":"Seconds","type":"number"},"svd":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Svd"},"until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Until"},"what":{"items":{"type":"string"},"title":"What","type":"array"}},"required":["what"],"title":"sample_valuesArguments","type":"object"},"name":"sample_values","outputSchema":{"additionalProperties":true,"title":"sample_valuesDictOutput","type":"object"}},{"description":"Run the target until it reaches `location` (a function, its inlined copies\nincluded, \"file.c:line\" or a \"0x...\" address) or writes `watch` (a variable, or a\n\"0x...\" address watched as 4 bytes), for at most `seconds`. The core is left halted where it stopped, with the call stack, until\nrelease_probe. Needs the ELF the target runs. Verified only when the chip's\nDFSR names the stop; a watchpoint stops just after the write.\nThe rest of the chip keeps running.\n    ","inputSchema":{"properties":{"elf_path":{"title":"Elf Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"seconds":{"default":10.0,"title":"Seconds","type":"number"},"watch":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Watch"}},"required":["elf_path"],"title":"run_untilArguments","type":"object"},"name":"run_until","outputSchema":{"additionalProperties":true,"title":"run_untilDictOutput","type":"object"}},{"description":"Reset the target and check that it restarted: the program counter is compared\nwith the reset vector during a brief halt, which is reported, and the core is\nthen left running from reset. Needs an open debug port: when the running\nprogram has closed it, board_state reconnects through a reset, and this tool\ndoes not. Stops a GDB server holding the probe first\n(`released_probe_first`). To stop the core somewhere, use run_until.\n    ","inputSchema":{"properties":{"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"reset_targetArguments","type":"object"},"name":"reset_target","outputSchema":{"additionalProperties":true,"title":"reset_targetDictOutput","type":"object"}},{"description":"Read the core registers, halting the core for the read; with `elf_path`, also\nthe call stack with each frame's arguments and locals. Says whether the core\nruns again afterwards. Works while run_until holds the core halted, and leaves\nit so. Without `elf_path`, a core it cannot reach as it runs is reached through\na reset, which `target_was_reset` reports; with `elf_path` it\nrefuses instead. Halts the core, so not for routine checks.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"core_registersArguments","type":"object"},"name":"core_registers","outputSchema":{"additionalProperties":true,"title":"core_registersDictOutput","type":"object"}},{"description":"Read and decode the Cortex-M fault status registers without halting or\nresetting the target. They stay set until software or a reset clears them, so\ncall this first after a crash; a probe run_firmware still holds resets a core\nthat locks up, which clears them. Says whether a fault is active, what happened\nin plain words, the faulting address when the hardware recorded it, and how to\nfind the instruction. Refuses Cortex-M0, M0+, M1 and M23 cores.\n    ","inputSchema":{"properties":{"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"read_fault_statusArguments","type":"object"},"name":"read_fault_status","outputSchema":{"additionalProperties":true,"title":"read_fault_statusDictOutput","type":"object"}},{"description":"Read the option bytes as ST's programmer reads and explains them: readout\nprotection first, then each section, such as brown-out level, user\nconfiguration, boot addresses and write protection, with every value and its\nmeaning. Read only: no tool here writes option bytes, since some writes cannot\nbe undone. Never halts or resets the target. Fails, with ST's reason, on a part\nthe programmer has no option bytes for, such as the STM32N6.\n    ","inputSchema":{"properties":{"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"read_option_bytesArguments","type":"object"},"name":"read_option_bytes","outputSchema":{"additionalProperties":true,"title":"read_option_bytesDictOutput","type":"object"}},{"description":"Find the instruction that faulted, from the exception frame. Halts the core to\nread registers, and never resets it, since a reset loses the fault: refuses\nwhen the core cannot be reached without one. Call it while the core sits in a\nfault handler. Returns the stacked PC and LR, from the stack that EXC_RETURN in\nLR names; with `elf_path`, their functions and source lines. Refuses when the\ncore is not in a handler or LR no longer holds EXC_RETURN.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"locate_faultArguments","type":"object"},"name":"locate_fault","outputSchema":{"additionalProperties":true,"title":"locate_faultDictOutput","type":"object"}},{"description":"Disassemble a function, or the code around an address, from the ELF, with\neach instruction's source file and line and the function an inlined copy comes\nfrom. `location` is a function name or an address. Without `probe_serial` it\nreads only the ELF; with it, it also compares the target's code with the ELF's,\nwithout halting, and is verified only when they match. At most 256\ninstructions; `cut` says when there were more.\n    ","inputSchema":{"properties":{"elf_path":{"title":"Elf Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"location":{"title":"Location","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"required":["elf_path","location"],"title":"disassembleArguments","type":"object"},"name":"disassemble","outputSchema":{"additionalProperties":true,"title":"disassembleDictOutput","type":"object"}},{"description":"Capture what a target prints on its serial console for up to 60 seconds.\n\nThe port is the one the probe list maps to this probe's serial, or the one\nSTLINK_MCP_CONSOLE names for it, never the first /dev/ttyACM*; refused when\nthere is none. What the probe buffered before the port opened comes back\nseparately, in `console_buffered`. Hearing nothing is unverified: silence\ncannot be told from a port not wired to the target.\n    ","inputSchema":{"properties":{"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"seconds":{"default":5.0,"title":"Seconds","type":"number"}},"title":"capture_consoleArguments","type":"object"},"name":"capture_console","outputSchema":{"additionalProperties":true,"title":"capture_consoleDictOutput","type":"object"}},{"description":"Capture what the target writes to an ITM stimulus port, over the SWO pin.\n\n`core_clock_hz` is the clock the core runs at while it writes; a wrong one\ngives nothing or garbled text. Does not halt or\nreset, but turns trace output on and leaves it on, taking the SWO pin from the\napplication until a power cycle. SWD only. Works beside a GDB server holding the\nprobe when stlink-server is installed. Hearing nothing is unverified.\n    ","inputSchema":{"properties":{"core_clock_hz":{"title":"Core Clock Hz","type":"integer"},"itm_port":{"default":0,"title":"Itm Port","type":"integer"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"seconds":{"default":5.0,"title":"Seconds","type":"number"}},"required":["core_clock_hz"],"title":"capture_swoArguments","type":"object"},"name":"capture_swo","outputSchema":{"additionalProperties":true,"title":"capture_swoDictOutput","type":"object"}}],"ttlMs":0}}}
{"at":"2026-11-23T05:28:57.024Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:28:58.044Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"stlink-mcp drives STM32 boards through an ST-LINK probe with ST's STM32CubeCLT tools.\n\nEvery result has a status. verified: verified_by says what was observed. unverified: it may have worked, but nothing checked it, and unverified_because says why; this is not success. failed: error says why. Read the status before the values.\n\nA usual session: `list_probes`, then `board_state` to identify the board. `run_firmware` loads an ELF linked for RAM and starts it; a build linked for flash, the default from STM32CubeIDE and CubeMX, goes `flash_firmware`, then `reset_target`, then `capture_console`. Without halting the program: `capture_console`, `capture_swo`, `sample_values`, `read_memory`, `read_fault_status`, `read_option_bytes` and `disassemble`. Halting it: `run_until`, `core_registers` and `locate_fault`. `reset_target` restarts it; `release_probe` when done.\n\nGive `probe_serial` on every call: without it each call first lists the probes, which takes a second or more and holds up every other board. Give addresses as \"0x...\" strings and files as absolute paths. `run_firmware` lets go of the probe once the program starts; with `keep_probe=True` a GDB server keeps holding it, and while it does, a core that locks up is reset, which clears its fault registers. `reset_target` and `flash_firmware` stop a holding server first and say so. A call that halts or resets the target says so. If the running program has closed the debug port, `board_state` can get back in by resetting the target, and `reset_target` cannot; on an STM32N6 running ST's start-up code, only a power cycle does. An unknown argument is refused, not ignored.\n","protocolVersion":"2025-11-25","serverInfo":{"name":"stlink-mcp","version":"0.9.0"}}}}
{"at":"2026-11-23T05:28:58.044Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:28:58.044Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:28:58.046Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"List every attached ST-LINK with its firmware, board name, serial console and\nwhether a GDB server holds it. Use the console mapping rather than the order of\n/dev/ttyACM*, which does not follow the probes. Listing takes about a second,\nand often much longer while a GDB server holds a probe, which is why the other\ntools should be given `probe_serial`.\n    ","inputSchema":{"properties":{},"title":"list_probesArguments","type":"object"},"name":"list_probes","outputSchema":{"additionalProperties":true,"title":"list_probesDictOutput","type":"object"}},{"description":"Identify the target, the probe and its family, and say whether the core is\nrunning, sleeping, halted or locked up, from program-counter samples read\nwithout halting it; given `elf_path`, where in the source they fall. If the\ncore cannot be reached as it runs, reconnects through a reset, which restarts\nthe program and can get past a debug port the program closed; `target_was_reset` says\nso. Never resets beside a GDB server holding the probe. `family.provenance`\nsays which values were measured.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"board_stateArguments","type":"object"},"name":"board_state","outputSchema":{"additionalProperties":true,"title":"board_stateDictOutput","type":"object"}},{"description":"Reset the target, load an ELF into its RAM, start it, and verify that it\nstarted: by its board's console output, or else by program-counter samples\ninside the image. Refuses an image not linked for RAM: vector table at\nboard_state's `vector_table_addr`, every segment within 0x20000000-0x3FFFFFFF.\nLets go of the probe once the program starts; `keep_probe=True` keeps a GDB\nserver holding it, and a core that then locks up is reset, clearing its fault\nregisters. No signing.\n    ","inputSchema":{"properties":{"console_seconds":{"default":3.0,"title":"Console Seconds","type":"number"},"elf_path":{"title":"Elf Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"keep_probe":{"default":false,"title":"Keep Probe","type":"boolean"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"required":["elf_path"],"title":"run_firmwareArguments","type":"object"},"name":"run_firmware","outputSchema":{"additionalProperties":true,"title":"run_firmwareDictOutput","type":"object"}},{"description":"Stop the GDB server holding a probe; with no serial, every probe's. Resumes a\ncore run_until left halted. While held, the reading tools work beside the\nserver, but a core that locks up is reset, clearing its fault registers. A\nprogram that closes the debug port closes it held or not; board_state then gets\nback in through a reset, restarting the program, except on an STM32N6 running\nST's start-up code, which needs a power cycle. `unverified` if nothing was held.\n    ","inputSchema":{"properties":{"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"release_probeArguments","type":"object"},"name":"release_probe","outputSchema":{"additionalProperties":true,"title":"release_probeDictOutput","type":"object"}},{"description":"Program an image into flash: a raw .bin at `address` or at a measured flash\nbase, or an ELF or HEX file at its own addresses, inside the part's flash; on a\nbase from ST's database or a board file, only inside the main-flash window; the\nresult names the base's provenance. Verified only when every byte reads back\nthe same. Does not sign or start the image; `next_step` says how it boots.\nPrefer run_firmware while developing.\n    ","inputSchema":{"properties":{"address":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"title":"Address"},"image_path":{"title":"Image Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"required":["image_path"],"title":"flash_firmwareArguments","type":"object"},"name":"flash_firmware","outputSchema":{"additionalProperties":true,"title":"flash_firmwareDictOutput","type":"object"}},{"description":"Read target memory without halting or resetting it, given one of: `address`\n(an integer or a \"0x...\" string, 4-byte aligned, `length_bytes` a multiple of\n4, at most 1024); `symbol`, a variable decoded with the types in `elf_path`; or\n`register`, such as \"RCC.CR\", decoded from ST's SVD file for the part (`svd`\npicks one). Refuses a register whose read changes state,\nsuch as a UART's data register, unless `read_effects_ok`. Refuses rather than\nreset at a closed debug port.\n    ","inputSchema":{"properties":{"address":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"default":null,"title":"Address"},"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"length_bytes":{"default":32,"title":"Length Bytes","type":"integer"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"read_effects_ok":{"default":false,"title":"Read Effects Ok","type":"boolean"},"register":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Register"},"svd":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Svd"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Symbol"}},"title":"read_memoryArguments","type":"object"},"name":"read_memory","outputSchema":{"additionalProperties":true,"title":"read_memoryDictOutput","type":"object"}},{"description":"Sample values while the program runs, without halting or resetting it: `what`\nlists variables (decoded with `elf_path`'s types; \"g_state.mode\" picks a\nmember), \"0x...\" word addresses, or registers such as \"ADC3.ISR\" (`svd` and\n`read_effects_ok` as in read_memory). All are read together, a few times a\nsecond, for `seconds` (at most 60), with the core's state; each comes back with\nfirst, last, range and changes. `until`, such as \"g_state.mode == MODE_RUN\" or\n\"g_ticks changes\", stops early.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"read_effects_ok":{"default":false,"title":"Read Effects Ok","type":"boolean"},"seconds":{"default":5.0,"title":"Seconds","type":"number"},"svd":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Svd"},"until":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Until"},"what":{"items":{"type":"string"},"title":"What","type":"array"}},"required":["what"],"title":"sample_valuesArguments","type":"object"},"name":"sample_values","outputSchema":{"additionalProperties":true,"title":"sample_valuesDictOutput","type":"object"}},{"description":"Run the target until it reaches `location` (a function, its inlined copies\nincluded, \"file.c:line\" or a \"0x...\" address) or writes `watch` (a variable, or a\n\"0x...\" address watched as 4 bytes), for at most `seconds`. The core is left halted where it stopped, with the call stack, until\nrelease_probe. Needs the ELF the target runs. Verified only when the chip's\nDFSR names the stop; a watchpoint stops just after the write.\nThe rest of the chip keeps running.\n    ","inputSchema":{"properties":{"elf_path":{"title":"Elf Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Location"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"seconds":{"default":10.0,"title":"Seconds","type":"number"},"watch":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Watch"}},"required":["elf_path"],"title":"run_untilArguments","type":"object"},"name":"run_until","outputSchema":{"additionalProperties":true,"title":"run_untilDictOutput","type":"object"}},{"description":"Reset the target and check that it restarted: the program counter is compared\nwith the reset vector during a brief halt, which is reported, and the core is\nthen left running from reset. Needs an open debug port: when the running\nprogram has closed it, board_state reconnects through a reset, and this tool\ndoes not. Stops a GDB server holding the probe first\n(`released_probe_first`). To stop the core somewhere, use run_until.\n    ","inputSchema":{"properties":{"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"reset_targetArguments","type":"object"},"name":"reset_target","outputSchema":{"additionalProperties":true,"title":"reset_targetDictOutput","type":"object"}},{"description":"Read the core registers, halting the core for the read; with `elf_path`, also\nthe call stack with each frame's arguments and locals. Says whether the core\nruns again afterwards. Works while run_until holds the core halted, and leaves\nit so. Without `elf_path`, a core it cannot reach as it runs is reached through\na reset, which `target_was_reset` reports; with `elf_path` it\nrefuses instead. Halts the core, so not for routine checks.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"core_registersArguments","type":"object"},"name":"core_registers","outputSchema":{"additionalProperties":true,"title":"core_registersDictOutput","type":"object"}},{"description":"Read and decode the Cortex-M fault status registers without halting or\nresetting the target. They stay set until software or a reset clears them, so\ncall this first after a crash; a probe run_firmware still holds resets a core\nthat locks up, which clears them. Says whether a fault is active, what happened\nin plain words, the faulting address when the hardware recorded it, and how to\nfind the instruction. Refuses Cortex-M0, M0+, M1 and M23 cores.\n    ","inputSchema":{"properties":{"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"read_fault_statusArguments","type":"object"},"name":"read_fault_status","outputSchema":{"additionalProperties":true,"title":"read_fault_statusDictOutput","type":"object"}},{"description":"Read the option bytes as ST's programmer reads and explains them: readout\nprotection first, then each section, such as brown-out level, user\nconfiguration, boot addresses and write protection, with every value and its\nmeaning. Read only: no tool here writes option bytes, since some writes cannot\nbe undone. Never halts or resets the target. Fails, with ST's reason, on a part\nthe programmer has no option bytes for, such as the STM32N6.\n    ","inputSchema":{"properties":{"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"read_option_bytesArguments","type":"object"},"name":"read_option_bytes","outputSchema":{"additionalProperties":true,"title":"read_option_bytesDictOutput","type":"object"}},{"description":"Find the instruction that faulted, from the exception frame. Halts the core to\nread registers, and never resets it, since a reset loses the fault: refuses\nwhen the core cannot be reached without one. Call it while the core sits in a\nfault handler. Returns the stacked PC and LR, from the stack that EXC_RETURN in\nLR names; with `elf_path`, their functions and source lines. Refuses when the\ncore is not in a handler or LR no longer holds EXC_RETURN.\n    ","inputSchema":{"properties":{"elf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Elf Path"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"title":"locate_faultArguments","type":"object"},"name":"locate_fault","outputSchema":{"additionalProperties":true,"title":"locate_faultDictOutput","type":"object"}},{"description":"Disassemble a function, or the code around an address, from the ELF, with\neach instruction's source file and line and the function an inlined copy comes\nfrom. `location` is a function name or an address. Without `probe_serial` it\nreads only the ELF; with it, it also compares the target's code with the ELF's,\nwithout halting, and is verified only when they match. At most 256\ninstructions; `cut` says when there were more.\n    ","inputSchema":{"properties":{"elf_path":{"title":"Elf Path","type":"string"},"interface":{"default":"swd","enum":["swd","jtag"],"title":"Interface","type":"string"},"location":{"title":"Location","type":"string"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"}},"required":["elf_path","location"],"title":"disassembleArguments","type":"object"},"name":"disassemble","outputSchema":{"additionalProperties":true,"title":"disassembleDictOutput","type":"object"}},{"description":"Capture what a target prints on its serial console for up to 60 seconds.\n\nThe port is the one the probe list maps to this probe's serial, or the one\nSTLINK_MCP_CONSOLE names for it, never the first /dev/ttyACM*; refused when\nthere is none. What the probe buffered before the port opened comes back\nseparately, in `console_buffered`. Hearing nothing is unverified: silence\ncannot be told from a port not wired to the target.\n    ","inputSchema":{"properties":{"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"seconds":{"default":5.0,"title":"Seconds","type":"number"}},"title":"capture_consoleArguments","type":"object"},"name":"capture_console","outputSchema":{"additionalProperties":true,"title":"capture_consoleDictOutput","type":"object"}},{"description":"Capture what the target writes to an ITM stimulus port, over the SWO pin.\n\n`core_clock_hz` is the clock the core runs at while it writes; a wrong one\ngives nothing or garbled text. Does not halt or\nreset, but turns trace output on and leaves it on, taking the SWO pin from the\napplication until a power cycle. SWD only. Works beside a GDB server holding the\nprobe when stlink-server is installed. Hearing nothing is unverified.\n    ","inputSchema":{"properties":{"core_clock_hz":{"title":"Core Clock Hz","type":"integer"},"itm_port":{"default":0,"title":"Itm Port","type":"integer"},"probe_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Probe Serial"},"seconds":{"default":5.0,"title":"Seconds","type":"number"}},"required":["core_clock_hz"],"title":"capture_swoArguments","type":"object"},"name":"capture_swo","outputSchema":{"additionalProperties":true,"title":"capture_swoDictOutput","type":"object"}}]}}}
