Skip to content

Wiring profile debug_port: choose SWD or JTAG for boards wired for both - #146

Merged
wardviaene merged 2 commits into
mainfrom
debug-port
Nov 23, 2026
Merged

wardviaene merged 2 commits into
mainfrom
debug-port

Conversation

@wardviaene

Copy link
Copy Markdown
Member

New optional wiring-profile field `debug_port` (`"swd"`, `"jtag"` or null = automatic), validated like the other fields. No new argument on `flash`.

Order in `flash` (one place: `flash.select_port`):

  1. Pins passed in the call win: JTAG pin(s) and no SWD pin -> JTAG (missing ones from the profile, else the existing missing-pins error); SWD pin(s) and no JTAG pin -> SWD. Both or neither: go on.
  2. The profile's `debug_port`. An incomplete pin set raises, e.g. "debug_port is jtag but jtag_tdo is not set".
  3. The existing automatic rule, unchanged.

When JTAG is chosen and SWD pins are known, `dap_start` still sends both with port jtag.

Behavior change: JTAG pins passed alone now mean JTAG even with SWD wired and an ARM target (before: SWD).

SDK + MCP together: README field lists, CHANGELOG 4.0.4, api_surface.json and tools_surface.json refreshed. MCP tests needing the field skip on an older SDK. Unit tests only; no hardware.

🤖 Generated with Claude Code

wardviaene and others added 2 commits November 23, 2026 17:13
Pins passed in the call win, then the profile's debug_port, then the automatic rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit 50341c9 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