Skip to content

Releases: z3oya/rttsh

rttsh 0.3.6

Choose a tag to compare

@z3oya z3oya released this 03 Oct 17:00

Seventh release on the 0.3.x line: the script command moves to a native Lua 5.4 engine and the scripting API gets its first major expansion - expect returns captures, and the expect family grows first-class negative assertions, multi-pattern waits, soft timeouts, and line reads.

Highlights

  • script runs on a native Lua 5.4. New Rust crate rttsh-lua (rttsh_lua_native.dll, FFI ABI v2) replaces NLua/KeraLua/lua54 - both managed dependencies are gone from the installer. Host callbacks never throw across the FFI boundary, and the rtt shim is single-sourced (rtt_shim.lua, embedded into rttsh.dll and included by the Rust tests via include_str!). The Lua glue ABI bump (v1 -> v2) is picked up by the same rebuild.
  • rtt.expect returns the match and its captures. local t, m, id = rtt.expect("id=(%d+)") - one step instead of a follow-up string.match; the first return value (the consumed text) is unchanged.
  • New expect family. rtt.try_expect softens only the timeout (returns nil, msg for polling loops); rtt.expect_absent is a first-class negative assertion (replacing the pcall workaround); rtt.expect_any waits for whichever of several patterns matches first; rtt.read_line consumes one newline-terminated line (nil when quiet); rtt.flush discards stale output.
  • Small conveniences. rtt.mem_read(addr) reads one 32-bit unit as a scalar; rtt.set_timeout(ms) adjusts the default expect timeout.
  • Verified on-target. All 23 example RTT tests pass on hardware (STM32H743XI + J-Link) after the migration, and a new compile-only test keeps the checked-in scripts valid Lua 5.4 without a board.

Download

  • rttsh-0.3.6-framework-setup.exe - framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, and the Rust glue DLLs rttsh_lua_native.dll / rttsh_elf_native.dll / rttsh_mcp_native.dll.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.

Full Changelog: v0.3.5...v0.3.6

rttsh 0.3.5

Choose a tag to compare

@z3oya z3oya released this 01 Oct 09:46

Sixth release on the 0.3.x line: --elf runs on a native ELF engine — the new Rust crate rttsh-elf — replacing the ELFSharp dependency, and the .rttsh/elf-cache parse cache is gone.

Highlights

  • --elf runs on a native ELF engine. Parsing, symbol lookup, and RTT control-block location move into rttsh_elf_native.dll (new Rust crate rttsh-elf, FFI ABI v1, same interop discipline as the MCP glue): a hand-written ELF32 reader with the same load ladder and CLI reason strings, kind-filtered symbol lookup, and the control-block plausibility gate. The public ElfImage API is unchanged. Verified on-target (STM32H743XI + J-Link): the full 23-script RTT suite passes through the new path and the resolved control block matches the firmware map file byte for byte.
  • ELFSharp dependency removed. rttsh.core now has zero package references; the installer ships rttsh_elf_native.dll instead of ELFSharp.dll.
  • .rttsh/elf-cache is gone. The native parse is faster than the cache's JSON restore ever was, so --elf is a plain read-and-parse and no cache files are written.

Download

  • rttsh-0.3.5-framework-setup.exe — framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, NLua/lua54 for the script command, and the Rust glue DLLs rttsh_elf_native.dll / rttsh_mcp_native.dll.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.

Full Changelog: v0.3.4...v0.3.5

rttsh 0.3.4

Choose a tag to compare

@z3oya z3oya released this 28 Sep 14:31

Fifth release on the 0.3.x line: ELF flashing is fixed via fromelf conversion, and tool paths move to a machine-level settings file.

Highlights

  • ELF images flash correctly. The J-Link DLL loads ELF at section execution addresses and drops the flash load-copy of RW data, so flashed firmware could boot with .data read from erased flash (seen on STM32H743XI with J-Link DLL v7.98a). flash download now converts ELF/AXF to a flat Intel hex with ARM Compiler's fromelf before the DLL sees it — point at the tool with the new --fromelf flag or the settings file, or let it be discovered on PATH and under the Keil install root. Without fromelf, ELF images are refused with guidance (exit 2).
  • Tool paths move to ~/.rttsh/settings.json (keys: dll, fromelf): machine-level, strict schema, command-line flags win, relative paths anchor to the settings directory. The config.json dll key is now rejected so stale configs fail loudly instead of being silently ignored.
  • Bare --log just works: it writes a timestamped file under .rttsh/log/ instead of requiring a path.

Download

  • rttsh-0.3.4-framework-setup.exe — framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, NLua/lua54 for the script command, ELFSharp for --elf, and rttsh_mcp_native.dll for mcp.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.

Full Changelog: v0.3.3...v0.3.4

rttsh 0.3.3

Choose a tag to compare

@z3oya z3oya released this 26 Sep 04:51

Fourth release on the 0.3.x line: rttsh becomes an MCP server, so a coding agent can drive a live RTT target with the same eight verbs the CLI uses.

Highlights

  • New mcp subcommand serves the Model Context Protocol over stdio, with eight tools: connect / disconnect / get_status, send, rtt_read, expect, mem_read, and list_devices. Point any MCP client at rttsh mcp and the session, channel polling, and hex/ASCII views work exactly as in the terminal.
  • The protocol server itself (rmcp) runs inside a new native DLL, rttsh_mcp_native.dll (Rust crate under native/), while tool execution stays in managed code. The two halves talk over a versioned FFI with a startup ABI check, and panics inside the DLL are caught and surfaced as clean errors instead of taking the process down.
  • CLI polish: options may now precede positional arguments (rttsh --chip X monitor works), a missing --chip fails fast before any session work starts, and the chip name is validated against the J-Link device database before dispatch, so typos are caught with suggestions instead of a link failure.

Download

  • rttsh-0.3.3-framework-setup.exe — framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, NLua/lua54 for the script command, ELFSharp for --elf, and rttsh_mcp_native.dll for mcp.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.

Full Changelog: v0.3.2...v0.3.3

rttsh 0.3.2

Choose a tag to compare

@z3oya z3oya released this 25 Sep 05:33

Third release on the 0.3.x line: the J-Link link grows debugger powers — flash programming and scripted memory/core control.

Highlights

  • New flash subcommand programs or erases the target without opening an RTT link: rttsh flash download <file> accepts Intel hex / ELF / S-record (self-addressed formats) or a raw bin with --addr, and rttsh flash erase wipes the whole chip. Destructive work is preceded by a reset-halt, progress streams live, and the core stays halted afterwards unless --reset resumes it. Erase asks for confirmation interactively (--yes when stdin is redirected) and honors the per-target lock.
  • Lua scripts gain debugger-style memory and core control: rtt.mem_read/rtt.mem_write take a width (8/16/32-bit) and exchange data as tables, while rtt.halt/rtt.resume/rtt.is_halted wrap the core state. A script-held halt suspends the idle stalled-core detection, so the halt–mem access–resume flow survives a quiet link.
  • J-Link groundwork: five new DLL exports (WriteMemEx/Halt/DownloadFile/EraseChip/SetFlashProgProgressCallback), all resolved optional — an older pure-RTT J-Link DLL still connects.

Download

  • rttsh-0.3.2-framework-setup.exe — framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, NLua/lua54 for the script command, and ELFSharp for --elf.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.

rttsh 0.3.1

Choose a tag to compare

@z3oya z3oya released this 24 Sep 14:19

Second release on the 0.3.x line: persistence, caret editing and root-anchored state for the monitor.

Breaking

  • The JSON config file moved from ./.rttsh.config.json to ./.rttsh/config.json — move the file (or pass --config); the old location is no longer read.

Highlights

  • -C/--root <dir> runs rttsh as if started in <dir> (git -C semantics): the implicit config, the .rttsh/ state and every relative path anchor to it.
  • --elf parse cache: a firmware image parses once, the result is cached under .rttsh/elf-cache/ and revalidated by a content hash, so rebuilds skip the parse.
  • TUI input history persists across sessions in .rttsh/tui-history.json (newest 500 lines, rewritten on exit, tolerant of missing/corrupt files).
  • The TUI input row has a real caret: Left/Right/Home/End move it, Delete/Backspace edit around it, printable chars insert at it — and CJK double-width chars are counted as two cells, so the caret sits exactly between glyphs even in Chinese and in over-long lines.

Download

  • rttsh-0.3.1-framework-setup.exe — framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, NLua/lua54 for the script command, and ELFSharp for --elf.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.

rttsh 0.3.0

Choose a tag to compare

@z3oya z3oya released this 23 Sep 14:37

First standalone release of rttsh, the J-Link RTT terminal, extracted from Toolbox.

Download

  • rttsh-0.3.0-framework-setup.exe — framework-dependent installer (requires the .NET 10 runtime). Flat install layout: rttsh.exe, rttsh.core.dll, NLua/lua54 for the script command, and ELFSharp for --elf.

A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.