Skip to content

fix: make fbuild own ESP RISC-V toolchain resolution without local path overrides #2700

Closed

Description

@zackees

Context
While validating AutoResearch on esp32s3, the default bash compile esp32s3 --examples AutoResearch path reached the fbuild build, proving the sketch filter allowed AutoResearch, but fbuild failed before compiler diagnostics with:

error: daemon error: stream error: error decoding response body

A temporary PlatformIO fallback exposed a second, related tooling smell: the generated .build/pio/esp32s3/platformio.ini used cached pioarduino/platform-espressif32 54.03.20, whose platform.json requires [email protected]+20241119 even for an ESP32-S3 build. PlatformIO then tried to download that package and stalled at Downloading 0%.

The machine already had a usable local ESP RISC-V toolchain at:

C:/Users/niteris/.platformio/packages/toolchain-riscv32-esp

with package metadata for 14.2.0+20251107 and a .piopm URI pointing at .fastled/compile/pio/esp32p4/tools/toolchain-riscv32-esp. Adding this generated-only override let the staged AutoResearch project compile successfully:

platform_packages =
    toolchain-riscv32-esp@symlink://C:/Users/niteris/.platformio/packages/toolchain-riscv32-esp

That path is user-specific and PlatformIO-specific. Per current project direction, FastLED should not rely on PlatformIO fallback for validation; fbuild should be the exclusive board-build path.

Proposal
Make fbuild own ESP toolchain/package resolution end-to-end so ESP32-S3/ESP32-P4/etc. builds never require hardcoded local PlatformIO package paths or a PlatformIO fallback.

Concretely, audit the fbuild ESP platform/toolchain resolver for cached pioarduino/platform-espressif32 packages and ensure it can reuse or provision the required RISC-V helper toolchain deterministically, even when the platform manifest names an older package version than the local cache already contains.

Acceptance criteria

  • bash compile esp32s3 --examples AutoResearch succeeds through fbuild without --platformio, --no-filter, or generated platform_packages path overrides.
  • bash autoresearch esp32s3 --lcd ... builds/deploys through fbuild only.
  • No generated config needs user-specific paths such as C:/Users/<user>/.platformio/packages/toolchain-riscv32-esp.
  • fbuild reports a clear actionable error when a required ESP toolchain is missing or incompatible, instead of failing as stream error: error decoding response body.
  • Regression coverage or a build-tooling test covers ESP32-S3 with cached pioarduino/platform-espressif32 and the RISC-V helper toolchain requirement.

Open questions

  • Should fbuild accept a newer compatible local ESP RISC-V toolchain (14.2.0+20251107) when the platform manifest asks for 14.2.0+20241119, or should it provision the exact manifest version in its own cache?

Activity

  1. zackees commented on Jun 3, 2026

    @zackees
    MemberAuthor

    Filed upstream tracking issue: FastLED/fbuild#401 — "fbuild ESP toolchain resolution: surface better diagnostic + provision all platform.json packages"

    That issue captures the concrete fbuild-side scope needed to close this one:

    • Make build_streaming decode a final OperationResponse (or error envelope) on the failure path so users get an actionable message instead of stream error: error decoding response body (crates/fbuild-cli/src/daemon_client.rs:516).
    • Audit Esp32Platform::get_package_url / resolve_pioarduino_packages to enumerate and provision every package listed in the pioarduino platform.json (toolchains, frameworks, helper toolchains) — not just the MCU-primary toolchain.
    • Decide and document the version-compatibility policy (accept a newer cached toolchain vs. always provision the exact manifest version).
    • Add a tests/platform/esp32s3 integration that pins platform = …/pioarduino/.../54.03.20/platform-espressif32.zip (not stock platform = espressif32), so the cached pioarduino + RISC-V-helper shape is regression-covered.

    Once fbuild#401 lands and a new fbuild release ships, the FastLED pin bump (incremental: PR #2712 already bumped to fbuild==2.2.17, which carries the unrelated ESP32-S3 esptool-write fix from fbuild#380) will pull the resolver fix in and this issue can close.

    Cross-links:

  2. moved this from Triage to Done in FastLED Trackeron Jun 3, 2026
  3. zackees commented on Jun 3, 2026

    @zackees
    MemberAuthor

    Closing in favor of the upstream tracking issue FastLED/fbuild#401, where the actionable engineering work lives:

    • Better diagnostic on build_streaming's failure path (so users see the real cause instead of stream error: error decoding response body).
    • Audit Esp32Platform::get_package_url / resolve_pioarduino_packages to enumerate every package listed in the pioarduino platform.json (toolchains, frameworks, helper toolchains) — not just the MCU-primary toolchain.
    • Version-compatibility policy for cached vs. manifest-pinned toolchain versions.
    • Regression test on tests/platform/esp32s3 pinning the pioarduino URL (not stock platform = espressif32).

    Forward progress here:

    Reopen if you want this issue to track the FastLED-side bump separately rather than rolling it into the next routine pin bump.

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