Skip to content

Pin directions on by default: dut_dirs in the wiring profile, sent on connect (SDK + MCP 2.13.14) - #77

Merged
wardviaene merged 2 commits into
mainfrom
wiring-dut-dirs
Nov 13, 2026
Merged

wardviaene merged 2 commits into
mainfrom
wiring-dut-dirs

Conversation

@wardviaene

Copy link
Copy Markdown
Member

The pod's pin-direction safety (la_dir, firmware 3.10.4) only protected pins someone marked by hand. Now the wiring profile gives every wired role and signal a DUT direction, and the SDK and MCP send them on their own.

SDK (embeddedci 2.13.14)

  • On firmware 3.10.4+ (Capabilities.la_dir), BenchPod() sends the profile's directions with la_dir when it connects and whenever bp.wiring changes (also save_wiring with a new profile). Pins the profile doesn't name are marked unknown. Older firmware and the USB console are skipped quietly.
  • It never fails the connection: bp.pin_directions_status is "sent" or "not sent: <why>" (older firmware, or a pin the profile calls a DUT output that is driven right now). apply_pin_directions() still raises.
  • Defaults: uart_rx, spi_miso = dut_output; uart_tx, spi_sclk/mosi/cs, swd_swclk = dut_input; I2C and swd_swdio = bidir (SWD is new); signals from their pod-side direction (input -> dut_output, output -> dut_input, else bidir).
  • New top-level profile key dut_dirs: role key or signal name -> dut_input / dut_output / bidir, validated. Top-level on purpose: released SDKs keep an unknown top-level key in Wiring.extra (a new signal field would make them drop the whole server profile). Old profiles stay valid.
  • Wiring.dut_dir(name), Wiring.pin_dut_dirs(); describe() shows the direction column. apply_pin_directions() sends unknown first and dut_output last.

MCP (embeddedci-mcp 2.13.14)

  • connect and set_wiring send them (via the SDK); wiring rows have dut_dir, wiring/set_wiring report directions; status warns when a driven pin kept them from going out (not for old firmware).

Order: the server must be deployed before an SDK sends dut_dirs to it (the current production server rejects unknown keys). The server side (schema, validation, server-side push on connect and save) is pushed to embeddedci-server main.

Tests: fake-transport host tests for defaults, overrides, validation, round trip, push on connect, skip on 3.10.3/unknown firmware, re-mark on a new profile, driven-pin conflict; MCP tests for set_wiring/wiring/old firmware. Not run on hardware.

🤖 Generated with Claude Code

wardviaene and others added 2 commits November 13, 2026 16:14
…beddedci 2.13.14)

On firmware 3.10.4+ the SDK sends the wiring profile's DUT directions with
la_dir on connect and whenever bp.wiring changes, and marks unwired pins
unknown; older firmware is skipped quietly. bp.pin_directions_status says how
it went; the connection never fails over it.

Every wired role and signal has a direction (SWD now too: SWCLK dut_input,
SWDIO bidir); the new top-level dut_dirs key overrides any of them. Old
profiles stay valid, and releases before this one keep a server profile with
dut_dirs in Wiring.extra.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_dir (embeddedci-mcp 2.13.14)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit baa3511 into main Nov 13, 2026
20 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