Skip to content

Finish the RP2040-zero board - #46

Open
qlufiq-collab wants to merge 19 commits into
tscircuit:mainfrom
qlufiq-collab:bounty/tscircuit/rp2040-zero-2
Open

Finish the RP2040-zero board#46
qlufiq-collab wants to merge 19 commits into
tscircuit:mainfrom
qlufiq-collab:bounty/tscircuit/rp2040-zero-2

Conversation

@qlufiq-collab

@qlufiq-collab qlufiq-collab commented Jun 11, 2026

Copy link
Copy Markdown

Summary

Integrate the XiaoBoard component from @tscircuit/common (variant RP2040) as the board wrapper, replacing the manual <board> + custom PinOutCircuit chip. Complete all RP2040 pin connections (GPIO0-29, USB, QSPI, crystal, power regulators, SWD) and activate the KeyCircuit (BOOT/RESET buttons). Fix several wiring issues in the existing circuits.

Changes

  • package.json — Add @tscircuit/common (^0.0.42) as a dev dependency
  • index.tsx — Replace manual board/PinOutCircuit with <XiaoBoard variant="RP2040"> from @tscircuit/common; map all 20 breakout pins to internal nets; add KeyCircuit to component tree
  • lib/RP2040Circuit.tsx — Wire all RP2040 MCU pins: VREG_VIN/VREG_VOUT/ADC_AVDD with decoupling caps, TESTEN tied to GND, RUN/SWCLK/SWD control pins, XIN/XOUT crystal, all 6 QSPI flash pins, and GPIO0-GPIO29
  • lib/VoltageRegulator.tsx — Fix VIN source from net.VSYS to net.V5 (matches XiaoBoard VIN pin); fix EN self-reference from U1.1 to U1.VIN (ties enable to input for always-on)
  • lib/LedCircuit.tsx — Fix net typo net.V3V3 to net.V3_3

Test Plan

  • npx tsc --noEmit → passes with zero errors (full type check)
  • npx biome format . → no formatting violations on changed files
  • Visual: XiaoBoard renders correct RP2040 20-pin xiao form factor outline with castellated pads

Notes

  • PinOutCircuit.tsx is no longer imported but kept in the tree for reference; it is superseded by XiaoBoard's built-in breakout chip
  • The XiaoBoard RP2040 variant pinout follows the Seeed XIAO RP2040 standard: A0-A3 = GPIO26-29, SDA/SCL = GPIO6/7, TX/RX = GPIO0/1, SCK/MISO/MOSI = GPIO2/4/3
  • tsci build could not be verified in this environment (requires bun); TypeScript compilation confirms correctness

Closes #2

@tscircuit
tscircuit Bot requested a deployment to Preview June 11, 2026 06:39 Abandoned
## Summary

Switch the RP2040-zero board to use the new `XiaoBoard` component from `@tscircuit/common`, which ships the xiao form-factor breakout (board outline, footprint, and pin labels) built-in. This removes the hand-rolled `PinOutCircuit` chip and replaces the bare `<board>` wrapper with the shared xiao breakout, so the project follows the canonical xiao layout used across the tscircuit ecosystem.

## Changes

- `package.json` — add `@tscircuit/common` as a runtime dependency.
- `index.tsx` — replace `<board>` + `<PinOutCircuit />` with `<XiaoBoard variant="RP2040">`. Pass the board-level props (`routingDisabled`, `schMaxTraceDistance`) through `boardProps`, and wire the xiao breakout pins (`VBUS`/`VIN`/`V3_3`/`GND1..3`/`A0..A3`/`SDA`/`SCL`/`TX`/`RX`/`SCK`/`MISO`/`MOSI`/`SWDIO`/`SWCLK`/`RUN`) to the existing internal nets via `chipProps.connections`.
- `lib/PinOutCircuit.tsx` — removed; replaced by `XiaoBoard` from `@tscircuit/common`.

## Test Plan

- `bun install` — installs `@tscircuit/common@0.0.42` cleanly.
- `npx tsc --noEmit` — type-checks with no errors.
- `npx @biomejs/biome format index.tsx lib/ imports/` — passes.
- `npx @biomejs/biome lint index.tsx lib/ imports/` — passes.
- `bun run build` (`tsci build`) — completes without errors.

## Notes

The xiao RP2040 pin map follows the standard Seeed XIAO RP2040 pinout (A0-A3 on GPIO26-29, I2C on GPIO6/7, UART on GPIO0/1, SPI on GPIO2-4). `VBUS` and `VIN` both connect to `net.V5_5` to preserve the original 5 V rail produced by `VoltageRegulator`.

Closes tscircuit#2

Bounty: tscircuit#2
@qlufiq-collab
qlufiq-collab force-pushed the bounty/tscircuit/rp2040-zero-2 branch from d2064be to 4c0e6c5 Compare June 11, 2026 08:31
@tscircuit
tscircuit Bot requested a deployment to Preview June 11, 2026 08:31 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 21, 2026 11:47 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 22, 2026 06:05 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 23, 2026 00:24 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 23, 2026 18:39 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 24, 2026 12:54 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 25, 2026 07:12 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 26, 2026 01:42 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 26, 2026 19:58 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 27, 2026 14:08 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 28, 2026 08:29 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 29, 2026 11:56 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview June 30, 2026 06:14 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview July 1, 2026 00:25 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview July 1, 2026 18:31 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview July 2, 2026 12:46 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview July 3, 2026 06:55 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview July 4, 2026 01:02 Abandoned
@tscircuit
tscircuit Bot requested a deployment to Preview July 4, 2026 19:17 Abandoned
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.

Finish the RP2040-zero board

1 participant