Repository navigation
Releases: z3oya/rttsh
Release list
rttsh 0.3.6
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
scriptruns on a native Lua 5.4. New Rust craterttsh-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 viainclude_str!). The Lua glue ABI bump (v1 -> v2) is picked up by the same rebuild.rtt.expectreturns the match and its captures.local t, m, id = rtt.expect("id=(%d+)")- one step instead of a follow-upstring.match; the first return value (the consumed text) is unchanged.- New expect family.
rtt.try_expectsoftens only the timeout (returnsnil, msgfor polling loops);rtt.expect_absentis a first-class negative assertion (replacing the pcall workaround);rtt.expect_anywaits for whichever of several patterns matches first;rtt.read_lineconsumes one newline-terminated line (nil when quiet);rtt.flushdiscards 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 DLLsrttsh_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
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
--elfruns on a native ELF engine. Parsing, symbol lookup, and RTT control-block location move intorttsh_elf_native.dll(new Rust craterttsh-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 publicElfImageAPI 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.corenow has zero package references; the installer shipsrttsh_elf_native.dllinstead ofELFSharp.dll. .rttsh/elf-cacheis gone. The native parse is faster than the cache's JSON restore ever was, so--elfis 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 thescriptcommand, and the Rust glue DLLsrttsh_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
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
.dataread from erased flash (seen on STM32H743XI with J-Link DLL v7.98a).flash downloadnow converts ELF/AXF to a flat Intel hex with ARM Compiler'sfromelfbefore the DLL sees it — point at the tool with the new--fromelfflag or the settings file, or let it be discovered on PATH and under the Keil install root. Withoutfromelf, 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. Theconfig.jsondllkey is now rejected so stale configs fail loudly instead of being silently ignored. - Bare
--logjust 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 thescriptcommand, ELFSharp for--elf, andrttsh_mcp_native.dllformcp.
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
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
mcpsubcommand serves the Model Context Protocol over stdio, with eight tools:connect/disconnect/get_status,send,rtt_read,expect,mem_read, andlist_devices. Point any MCP client atrttsh mcpand 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 undernative/), 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 monitorworks), a missing--chipfails 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 thescriptcommand, ELFSharp for--elf, andrttsh_mcp_native.dllformcp.
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
Third release on the 0.3.x line: the J-Link link grows debugger powers — flash programming and scripted memory/core control.
Highlights
- New
flashsubcommand 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, andrttsh flash erasewipes the whole chip. Destructive work is preceded by a reset-halt, progress streams live, and the core stays halted afterwards unless--resetresumes it. Erase asks for confirmation interactively (--yeswhen stdin is redirected) and honors the per-target lock. - Lua scripts gain debugger-style memory and core control:
rtt.mem_read/rtt.mem_writetake a width (8/16/32-bit) and exchange data as tables, whilertt.halt/rtt.resume/rtt.is_haltedwrap 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 thescriptcommand, and ELFSharp for--elf.
A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.
rttsh 0.3.1
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.jsonto./.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.--elfparse 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 thescriptcommand, and ELFSharp for--elf.
A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.
rttsh 0.3.0
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 thescriptcommand, and ELFSharp for--elf.
A self-contained setup can be produced from the repo: installer\build-installer.ps1 -SelfContained.