Skip to content

Bundle CC2340 bidirectional capability handling in TI CLI - #259

Merged
AnasSarkiz merged 4 commits into
mainfrom
fix/cc2340-bidirectional-capabilities
Oct 6, 2026
Merged

AnasSarkiz merged 4 commits into
mainfrom
fix/cc2340-bidirectional-capabilities

Conversation

@AnasSarkiz

@AnasSarkiz AnasSarkiz commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Updates the bundled converter to circuit-json-to-sysconfig #10, pinned to 05add591d6d678cc7457c985b08096690d1e3949. Imported CC2340 GPIO capability metadata (isBidirectional: true) can now coexist with explicit GPIO input/output choices.

Before, a TSX pin with { isOutput: true, isBidirectional: true } failed conversion. After, it exports the selected GPIO output unchanged. Capability-only connected GPIOs still fail with one line per pin:

- U1 pin 4 (DIO11): GPIO direction is missing

The converter prints no additional component header or instructions for these pin errors. The CLI retains its standard failure prefix. The terminal regression tests use toMatchInlineSnapshot() and retain assertions for empty stdout, no output file, no generated IDs and no stack traces.

Validation:

  • 60 Node CLI tests and three Bun tests pass, including both inline error snapshots.
  • Typecheck, formatting and npm build pass.
  • Clean tarball installation passes local and isolated global CLI tests, ESM/CJS imports, type declarations and rendering, using the minimum supported tscircuit version.
  • Fresh tsci clone imrishabh18/pedometer (registry 1.1.3), MCU reimport with tscircuit 0.0.2747, and merged current datasheet metadata: missing directions are correctly reported for pins 4, 5, 6, 9, 10 and 12.
  • In that local clone, adding the six GPIO directions already documented in the board's own interface/firmware files produces a 1,495-byte index.syscfg; official TI SysConfig 1.28.1+4785 with SimpleLink F3 SDK 9.21.00.36 validates the TSX and generates seven files. No request JSON is required.

This does not infer GPIO direction from datasheet capabilities or claim a complete hardware-tested firmware application. Separate from the merged diagnostics PR #257.

Remaining firmware setting outside this fix: the generated display-control GPIO (physical pin 9 / DIO20) uses the SDK's LOW startup default, while docs/firmware-and-bringup.md specifies HIGH. Input interrupts also remain at SDK defaults. Passing SysConfig validation does not mean those application settings are implemented.

@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ti-system-block-ui Ready Ready Preview Oct 6, 2026 8:42pm UTC

Request Review

@AnasSarkiz
AnasSarkiz merged commit 1123875 into main Oct 6, 2026
5 of 6 checks passed
@AnasSarkiz
AnasSarkiz deleted the fix/cc2340-bidirectional-capabilities branch October 6, 2026 20:53

This branch had an error being deployed

1 failed deployment
Preview — e021a0ac Deployed Oct 6, 2026 by tscircuit[bot]
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.

2 participants