Skip to content

JTAG flashing: wiring fields, dap_start pins, automatic SWD/JTAG choice (SDK + MCP) - #144

Merged
wardviaene merged 5 commits into
mainfrom
jtag
Nov 23, 2026
Merged

wardviaene merged 5 commits into
mainfrom
jtag

Conversation

@wardviaene

Copy link
Copy Markdown
Member

Adds JTAG to the on-pod CMSIS-DAP probe path, for firmware with the jtag feature (features table rev 16, gateware v61+, not the emulation image).

  • Wiring: jtag_tck, jtag_tms, jtag_tdi, jtag_tdo, optional jtag_trst (LA 1-14). jtag_tck may share a channel with swd_swclk, jtag_tms with swd_swdio; any other overlap is an error.
  • Transport.dap_start() takes tck, tms, tdi, tdo, trst, port; SWD pins are optional when JTAG pins are given.
  • flash() picks the port itself (no transport option): JTAG when all four JTAG pins are known (arguments override the profile) and either there are no SWD pins or the target is JTAG only (esp32, esp32s2, gd32vf103, fe310, k210, riscv*, matched on the OpenOCD config's file name); otherwise SWD. JTAG sends the JTAG pins (plus SWD pins with "port":"jtag" when wired) and runs OpenOCD with transport select jtag. A pod without the jtag feature raises UnsupportedFeatureError before arming. Server-side (embeddedci.com) flashing of an uploaded build refuses JTAG for now.
  • MCP: flash takes tck, tms, tdi, tdo, trst; set_wiring/wiring carry the fields. Works with an older SDK for SWD (JTAG args say to upgrade).
  • Bundled feature table synced to revision 16; API and tool surface snapshots regenerated; READMEs and CHANGELOGs (4.0.4 entries) updated. No version bump, no release.

Tests: new tests/test_jtag.py (validation, dap_start JSON, auto-selection, OpenOCD transport) and MCP wiring/flash tests. Unit tests only, no hardware.

🤖 Generated with Claude Code

wardviaene and others added 4 commits November 23, 2026 13:57
…re table rev 16

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ransport select jtag; tests, docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…elds (mcp-min-sdk)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit a0be9c5 into main Nov 23, 2026
12 checks passed
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