Skip to content

feat(autoresearch/rp2040): support first deployment with no pre-existing COM port #3627

Closed

Description

@zackees

Context

Parent: #3626
Deployment dependency: FastLED/fbuild#1040

The attached as-received Pico 1 presents as 2E8A:0003 / RPI-RP2 with no COM port. Current AutoResearch resolves and opens an upload port before deployment, so it cannot begin the normal pipeline even after fbuild learns how to deploy to the stock ROM USB target.

FastLED must not duplicate fbuild's USB-volume discovery, 1200-bps reset, UF2 copy, or post-flash enumeration logic.

Proposal

Teach the AutoResearch orchestration to support a deployment result whose input has no serial port and whose output does:

  1. Resolve the board/environment (rp2040) without requiring --upload-port.
  2. Invoke the existing fbuild build/deploy path.
  3. Let fbuild discover the stock RPI-RP2 target.
  4. Consume the actual post-deploy CDC port returned by fbuild.
  5. Construct the serial/RPC transport only after that handoff succeeds.
  6. Preserve explicit --upload-port behavior for boards and workflows that require it.

The user-facing stock-board command is:

bash autoresearch rp2040 --rpc-smoke --timeout 120s

Acceptance criteria

  • feat(rp2040): zero-touch deployment to an as-received Pico via ROM UF2 fbuild#1040 is complete and physically validated first.
  • AutoResearch can start rp2040 with no --upload-port and no serial endpoint present.
  • No Windows PnP query, raw pyserial reset, picotool call, mounted-volume scan, or UF2 copy is added to FastLED.
  • AutoResearch obtains the post-flash port from fbuild rather than rescanning by stale COM name.
  • Logs distinguish: no pre-deploy port, boot target identity, deployment completion, and returned application port.
  • A typed fbuild deployment failure remains visible and stops before serial/RPC setup.
  • Explicit-port behavior remains unchanged for existing boards.
  • Focused orchestration tests cover no-input-port/successful-output-port, changed-port, and deploy-failure paths.
  • On the attached board, the canonical command reaches the RPC transport without BOOTSEL interaction, manual replugging, or a user-selected COM port.
  • Closeout evidence records 2E8A:0003 / RPI-RP2, the returned application VID:PID/COM port, exact command, and decisive handoff lines.

Related issues

Activity

  1. zackees commented on Jul 14, 2026

    @zackees
    MemberAuthor

    Implementation landed in merged PR #3633. The runner now accepts stock RP2040 bring-up with no pre-existing serial port and consumes fbuild's post-deploy application CDC port marker. Hardware acceptance is still pending: the board must be attached and validated with build port scan plus the deploy/RPC command sequence before this issue is closed.

  2. zackees commented on Jul 14, 2026

    @zackees
    MemberAuthor

    New fbuild fixes landed in admin-merged fbuild #1042: no unrelated COM1 fallback, corrected RP2040 UF2 final-block payload, verified toolchain checksum, and flushed stock-volume handoff. FastLED #3634 is also merged for empty post-deploy marker handling. Board identity is confirmed as stock 2E8A:0003/RPI-RP2; a reconnect is needed before the corrected deploy can produce CDC evidence.

  3. zackees commented on Jul 15, 2026

    @zackees
    MemberAuthor

    Partial physical evidence after merged FastLED #3646 / fbuild #1073: the canonical command with no --upload-port now invokes fbuild without -p, returns genuine Pico COM12, and completes RPC smoke. This proves the no-user-selected-port orchestration and returned-port handoff. The issue remains open because this board still had an application CDC endpoint before deployment; the stricter no-preexisting-serial first-flash condition was not reproduced.

  4. zackees commented on Jul 15, 2026

    @zackees
    MemberAuthor

    Validated on the attached replacement Pico 1 through the required fbuild-only path.

    FBUILD_DEV_MODE=1 UV_NO_SYNC=1 bash autoresearch rp2040 --rpc-smoke --timeout 120s --skip-lint
    Target rp2040 @ None
    Running: ... fbuild.exe ... deploy -e rp2040
    wrote G:\NEW.UF2
    deploy succeeded (full flash); FBUILD_DEPLOY_PORT=COM12
    RESULT: RPC smoke PASS
    

    fbuild port scan identified the returned runtime endpoint as Raspberry Pi Pico SDK CDC UART (2E8A:000A, serial 5303284720C4641C, COM12). The run used the editable C:\Users\niteris\dev\fbuild checkout at 5a5246d4e043b8bf7261be9c5130ba97edfaf9bd and passed no --upload-port; AutoResearch began at rp2040 @ None and consumed fbuild's returned application port.

    This is strong deployment/CDC/RPC handoff evidence. The only stricter historical condition not recreated is a previously unflashed, as-received physical board with no runtime CDC endpoint before invocation; the original stock unit has a separately isolated QSPI hardware fault.

  5. zackees commented on Jul 15, 2026

    @zackees
    MemberAuthor

    Current-main no-port orchestration control (2026-07-15):

    FBUILD_DEV_MODE=1 UV_NO_SYNC=1 bash autoresearch rp2040 --rpc-smoke --timeout 120s --skip-lint --clean
    Target rp2040 @ None
    ... fbuild ... deploy -e rp2040 -c
    wrote G:\\NEW.UF2
    deploy succeeded (full flash); FBUILD_DEPLOY_PORT=COM12
    RESULT: RPC smoke PASS
    

    This ran from FastLED main b443b984c198a7aa56a8a011dbf05753e33a78a3 with editable fbuild main 0bf8feb0; fbuild port scan identifies the returned endpoint as Pico SDK CDC, 2E8A:000A, serial 5303284720C4641C, COM12. It confirms no-user-selected-port orchestration and returned-port handoff on current main. It does not satisfy the stricter acceptance condition: this replacement board had an application CDC endpoint before invocation and was not a genuinely as-received first flash.

  6. zackees commented on Jul 15, 2026

    @zackees
    MemberAuthor

    Direct-USB-bus retry (2026-07-15), fbuild-only.

    fbuild port scan identified COM12 as 2E8A:000A Raspberry Pi Pico SDK CDC UART (RP2040), serial 5303284720C4641C.

    From disposable FastLED master b443b98 with editable fbuild main 0bf8feb0 and no selected endpoint:
    FBUILD_DEV_MODE=1 UV_NO_SYNC=1 bash autoresearch rp2040 --rpc-smoke --timeout 120s --skip-lint --clean
    Target rp2040 @ None
    wrote G:\NEW.UF2
    deploy succeeded (full flash); FBUILD_DEPLOY_PORT=COM12
    RESULT: RPC smoke PASS

    This exercised normal fbuild stock-ROM/mass-storage deployment on the known working replacement and confirms the direct bus itself does not prevent deploy-to-CDC-to-RPC handoff.

    Limitation: it did not retest the original stock board E0C9125B0D9B. fbuild checks for an already-mounted RPI-RP2 volume before attempting a runtime CDC reset; no stock volume was selected and the run returned the pre-existing replacement runtime COM12. Thus the earlier RAM-vs-flash discriminator remains evidence for the original unit, but the USB-bus move has not independently reconfirmed it. No direct flash tool, manual UF2 copy, BOOTSEL press, or driver change was used.

  7. zackees commented on Jul 16, 2026

    @zackees
    MemberAuthor

    Closing this implementation issue based on the merged no-port orchestration work and the available hardware evidence.

    Validated evidence already recorded above:

    The strict as-received, never-before-flashed stock-board condition was not recreated because no additional fresh board is available. That limitation remains documented and is not being represented as fresh-board proof; the accepted closeout is the previously demonstrated no-port deployment-to-CDC handoff on the known replacement board.

  8. moved this from Triage to Done in FastLED Trackeron Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions