Terminal UI for real-time debug streaming over OpenOCD using the ProbeStream protocol.
- TUI Quick Start — first-run setup, settings, OpenOCD, probe selection, scan/attach, and streaming
- ProbeStream README — project overview, target integration, performance notes, and repository layout
- Target C API — firmware-side
PS_Init, write/printf, channel, and down-channel APIs - Wire Protocol — control block and ring-buffer layout used by host tools
- TUI Commands — slash command reference for this interface
- TUI Settings — persisted settings used by the sidecar and OpenOCD launcher
- Python ≥ 3.10 — stdlib only, no pip packages required
- OpenOCD — STM32CubeIDE ships one, or install separately
- A terminal with kitty keyboard protocol support recommended (kitty, WezTerm, ghostty, Alacritty ≥ 0.14). Falls back gracefully on others.
- xclip (Linux only) — for clipboard support
Release builds include the Bun-compiled TUI binary, so users do not need Bun unless they are building from source.
Download the latest platform bundle from the ProbeStream releases page:
- Windows:
probestream-tui-<version>-windows-x64.zip - Linux:
probestream-tui-<version>-linux-x64.tar.gz
Extract the archive, then run the TUI from the extracted directory:
# Windows PowerShell
.\probestream-tui.exe# Linux
./probestream-tuiThe sidecar starts automatically from the bundled sidecar directory. Install OpenOCD separately and keep Python 3.10+ available on PATH.
Use this path only if you want to develop the TUI or build your own binary.
After cloning the repository, run the cross-platform installer from the repository root:
git clone <repo-url>
cd <repo>
python3 tools/tui/scripts/install-deps.pyOn Windows, use py or python if python3 is not available:
py tools\tui\scripts\install-deps.pyThe installer checks for Bun, installs it if missing, repairs the Bun PATH entry for future terminals, and runs bun install.
cd <repo>/tools/tui
bun installNo Python packages to install — the sidecar uses only the standard library.
bun run devThis starts the sidecar automatically and launches the TUI. The sidecar listens on http://127.0.0.1:17900 by default.
To run the sidecar separately (for debugging):
# Terminal 1: sidecar
./scripts/sidecar.sh
# Terminal 2: TUI (will detect the running sidecar)
bun run devbun run distProduces a standalone binary + sidecar in ../../probestream-tui-dist/. On Windows the binary is probestream-tui.exe; on Linux it is probestream-tui.
For a complete first-run walkthrough, including settings, OpenOCD setup, probe selection, attach/scan, and stream startup, see ../../docs/TUI-QuickStart.md.
- Press
/to open the command prompt /discover— list attached debug probes/probes— select a probe serial when more than one is attached/settings— configure OpenOCD path, interface, target, RAM range/openocd start— spawn OpenOCD for the selected probe/scan— scan target RAM for the ProbeStream control block/stream-start— begin streaming without re-running OpenOCD/scan/stream— view up-channel data/terminal 0— type commands to down-channel 0
| Key | Action |
|---|---|
/ |
Open command prompt |
? |
Page-specific help |
Ctrl+←/→ |
Switch pages (alt-tab style) |
Ctrl+C |
Quit |
Esc |
Close modal / unfocus prompt |
Enter |
Submit command / close switcher |
- Splash — status overview, detected probes, quick start action
- Probes — debug probe list, selected serial, OpenOCD session details
- Stream — live up-channel data viewer (raw/hex/ascii/line modes)
- Terminal — bidirectional down-channel communication
- Settings — all configuration options
- Log — command replies and backend messages, excluding stream payloads
/splash, /probes, /stream, /terminal, /settings, /log, /help, /quit
/openocd start, /openocd connect, /openocd stop
/discover, /scan, /attach <addr>
/start, /stop, /channel <n>, /mode raw|hex|ascii|line, /clear
Channels carry a type tag (raw, text, ascii-number, int32, uint32, float32, float64) set by the firmware via PS_WriteInt/PS_WriteUInt/PS_WriteFloat/PS_WriteDouble or PS_SetChannelType. The Stream page decodes typed numeric channels and enables graphing and running stats on them automatically. See Typed numeric channels and the graphing notes in the TUI Quick Start.
/terminal [channel], /terminal exit, /send <text>, /send-hex <hex>
/capture on|off|path <file>|format raw|text|jsonl
/set <key> <value>
Key settings (configurable via /settings page or /set):
| Setting | Default | Description |
|---|---|---|
themeName |
probe |
UI theme (probe, material, github) |
openocdPath |
openocd |
Path to OpenOCD binary |
interfaceConfig |
interface/stlink.cfg |
OpenOCD interface config |
targetConfig |
(empty) | OpenOCD target config |
adapterSerial |
(empty) | Debug probe serial selected from /probes |
tclPort |
6666 |
OpenOCD TCL-RPC port |
ramStart |
0x20000000 |
Target RAM start address |
ramSize |
196608 |
RAM scan size in bytes |
readMode |
auto |
Memory read strategy (auto/bulk/mdw) |
pollMs |
25 |
Stream polling interval |
captureFormat |
raw |
Capture file format |
Settings persist to ~/.config/probestream-tui/settings.json on Linux/macOS, or %USERPROFILE%\.config\probestream-tui\settings.json on Windows.
┌────────────────────┐ HTTP/SSE ┌──────────────────┐
│ Bun/OpenTUI TUI │ ←───────────────→ │ Python Sidecar │
│ (React terminal) │ :17900 │ (stdlib HTTP) │
└────────────────────┘ └───────┬──────────┘
│ TCL-RPC
▼
┌──────────────────┐
│ OpenOCD │
│ (SWD/JTAG) │
└───────┬──────────┘
│
▼
┌──────────────────┐
│ Target MCU │
│ (ProbeStream) │
└──────────────────┘
# TypeScript tests
bun test
# Python sidecar tests (no hardware required)
python3 sidecar/test_probestream_reader.py -v
# TypeScript typecheck
bun run typecheck- Debug probe enumeration is best-effort via
st-info --probeorSTM32_Programmer_CLI -l - Single session at a time in v1
read_memory(bulk) may not work on all targets while running — falls back tomdw- No replay tooling yet for captured
.jsonlfiles