Skip to content

Add SWO trace console viewer - #57

Merged
emrainey merged 1 commit into
developfrom
issue-54
Aug 14, 2026
Merged

Add SWO trace console viewer#57
emrainey merged 1 commit into
developfrom
issue-54

Conversation

@emrainey

Copy link
Copy Markdown
Owner

Summary

Add Serial Wire Output (SWO) capture and viewing to tools/jalo.py, mirroring the existing RTT console workflow.

Changes

  • Add guarded J-Link SWO controller wrappers for enable, start, stop, flush, byte-count, raw reads, and stimulus-port reads.
  • Add an SWO Console tab with configuration controls, continuous capture, stimulus-port decoding, and line buffering.
  • Add CLI options for CPU speed, SWO speed, port mask, stimulus port, and automatic startup.
  • Stop SWO cleanly on disconnect and unmount.
  • Add host-side unit tests covering connected, disconnected, and error paths plus argument validation and decoding.

Verification

  • tools/test_jalo_swo.py: 54 tests passed.

Fixes #54

AI-authored work (opencode/big-pickle):
- JLinkController SWO wrappers over pylink-square (enable/start/stop/flush/
  read/read_stimulus/num_bytes/enabled), guarded by connected state.
- SWO Console tab in the TUI: CPU/SWO speed, port mask/port, bytes, continuous
  switch, Enable/Start/Read/Stop/Clear buttons, RichLog output.
- Shared decode_trace_chunk line-buffering helper (RTT refactored to use it).
- Auto-start after connect, stop on disconnect/unmount, restart after reset.
- CLI args --swo-cpu-speed/--swo-speed/--swo-port-mask/--swo-port/
  --swo-auto-start with parse_args validation.
- 54 unit tests in tools/test_jalo_swo.py (pylink mocked), all passing.
- Live-probe smoke test of the SWO wrappers against the J-Link remote server.

Human review: pending.

closes issue-54 (tool-side SWO viewer; target-side ITM init tracked in #41)
@emrainey emrainey self-assigned this Aug 13, 2026
@emrainey
emrainey merged commit 0dd89f0 into develop Aug 14, 2026
4 checks passed
@emrainey
emrainey deleted the issue-54 branch August 14, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant