Repository navigation
Description
Context
The delegated ESP-IDF build (board_build.build_system = espidf, crates/fbuild-build-esp/src/esp32/espidf_delegate.rs) pins one release, ESP-IDF v5.5.1 (IDF_RELEASE_VERSION in crates/fbuild-toolchain/src/toolchain/esp_idf_release.rs). It now serves the RISC-V targets as well as esp32s3, but v5.5.1 cannot target ESP32-P4 rev-3 silicon:
- v5.5.1
components/esp_hw_support/port/esp32p4/Kconfig.hw_supporthasESP32P4_REV_MAX_FULLdefault199and noESP32P4_REV_MIN_300choice. - v5.5.2 adds
ESP32P4_SELECTS_REV_LESS_V3andESP32P4_REV_MIN_300, withESP32P4_REV_MAX_FULL399when the rev-3 family is selected.
So reject_unsupported_silicon refuses any ESP32-P4 board whose SDK variant is not esp32p4_es (today: esp32-p4_r3) before anything is downloaded. That is the honest behaviour for the current pin, and it is a gap: rev-3 boards have no bare-IDF path.
Closed PR #1878 handled this with a second IDF pin (PlatformIO framework-espidf 5.5.5 for C5/P4) and a board-variant-to-Kconfig mapping (chip_variant=esp32p4 -> CONFIG_ESP32P4_REV_MIN_300=y, esp32p4_es -> CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y / CONFIG_ESP32P4_REV_MIN_0=y). That adapter was not landed (decision recorded in docs/design/bare-idf-component-builds.md, "RISC-V targets and the native-adapter decision"); its source is retained on origin/feat/espidf-s3-round1 (crates/fbuild-build-esp/src/esp32/orchestrator/idf/packages.json and project.rs) as the reference for the mapping.
Proposal
Move the delegated path's single pin to an ESP-IDF release that supports both ESP32-P4 silicon families (v5.5.2 or later), then select the family from the board:
- Bump
IDF_RELEASE_VERSION/IDF_RELEASE_COMMIT, the source archive + submodule pins (esp_idf_source.rs), the Python constraints/lock (esp_idf_python.rs) and everytools.jsonpin (esp_idf_release.rs). One release, not two: a second pin would bring back the two-stacks problem feat(esp32): build ESP-IDF-only applications across Xtensa and RISC-V targets #1878 was closed over. - Replace the rev-3 refusal with a board-derived default: pass the silicon family to the IDF build (for example an fbuild-owned
SDKCONFIG_DEFAULTSentry that precedes the project's own), and reject a projectsdkconfigthat selects the other family. - Re-run the delegated end-to-end tests for every listed chip on the new pin, and add
esp32p4-r3to the building set intests/platform/espidf_component_riscv.
Acceptance criteria
- RED:
fbuild build tests/platform/espidf_component_riscv -e esp32p4-r3fails with the rev-3 refusal (current behaviour). - GREEN: the same command builds, and the generated
sdkconfighasCONFIG_ESP32P4_REV_MIN_FULL=300;-e esp32p4still builds with a pre-rev-3 range. - The esp32s3, esp32c3, esp32c5 and esp32c6 delegated end-to-end tests pass on the new pin.
- Installed-size constants and the footprint table in
docs/reference/platformio-ini.mdare re-measured. - No second IDF release is pinned.
Not in scope
- Hardware validation on P4 boards (neither family has been booted from a delegated image).
- esp32, esp32s2, esp32c2 and esp32h2, which are refused because no project has been built for them through this path.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
zackees commentedon Nov 22, 2026
Stage 0 is up as PR #2146 (not a pin move): the
PINStable is now checked against the pinned release's owntools/tools.json, committed verbatim atcrates/fbuild-toolchain/data/esp-idf-v5.5.1-tools.json. So the AC1 bump becomes a reviewable data diff instead of 30 hand-copied sha256 rows, and a drifted row fails with its name in the message.Two measurements that came out of writing it:
PINSrows match v5.5.1'stools.jsonexactly (version, sha256, size, URL) — the existing copy is clean.tools.jsonpublishes nolinux-arm64ninja archive (keys: linux-amd64, macos, macos-arm64, win64), so a delegated build on an arm64 Linux host has pinned cmake and pinned toolchains but no pinned ninja. Outside this issue's cells, but the bump's e2e matrix should not assume ninja exists on arm64.Remaining cells here (version/commit/
PINS/Python-lock bump to v5.5.2+ — v5.5.6 is newest; board-derived P4 silicon family; re-measured installed sizes; five-chip e2e) still need a dedicated multi-step track rather than a 25-minute steward tick: the pin bump alone re-resolves the hash-locked Python env and re-measures a ~3.4 GB release.zackees commentedon Nov 22, 2026
Steward sizing note (2026-11-22, no code change here):
Re-measured on
origin/mainb165732bso the next taker does not have to:IDF_RELEASE_VERSIONis stillv5.5.1(crates/fbuild-toolchain/src/toolchain/esp_idf_release.rsL35), andPINS(L339-588) is a hand-copied table of 30 rows across 7 components (xtensa-esp-elf 5, riscv32-esp-elf 5, openocd-esp32 5, cmake 5, ninja 4, esp32ulp-elf 5, esp-rom-elfs 1) with no generator — every row that moves needs its sha256 andbytesre-captured from the real archive.v5.5.6exists (ref28871d80f730e6976c9bdc9c4cbff1c916e905a9), so the target release is available; the earlier note thatv5.5.1'stools.jsonships nolinux-arm64ninja archive still stands, so the e2e matrix must not assume ninja on arm64.docs/reference/platformio-ini.mdre-measured, plus delegated e2e builds for esp32s3/c3/c5/c6/p4 — a multi-GB download and five ESP-IDF project builds.That is not a one-hour steward tick on this host (load 15-22 on 16 cores, and a fresh worktree's first
-p fbuild-toolchaintest alone has cost ~85 min). Not blocked on anything external and not deferred — just too large to start half-way: a partial PINS bump without the re-measured sizes and the e2e matrix would be worse than none. This tick the steward took #2151 (CLIfbuild resetbypassing daemon device-lease admission), which was the next actionable item.zackees commentedon Nov 23, 2026
Stage delivered: PR #2161 moves the delegated pin from v5.5.1 to v5.5.6 (the newest patch of the same line) and selects the ESP32-P4 silicon family from the board's
build.chip_variantvia an fbuild-ownedSDKCONFIG_DEFAULTSentry that precedes the project's own:chip_variant = esp32p4→CONFIG_ESP32P4_REV_MIN_300=y(ESP32P4_REV_MIN_FULL=300)chip_variant = esp32p4_es→CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y+CONFIG_ESP32P4_REV_MIN_0=ysdkconfigthat pinned the other family is now a configuration error naming the file and symbol; a P4 board naming neither family is refused by name.Data moved with it: tool pins (xtensa/riscv32 GCC
20241119→20260121, esp-rom-elfs20241011→20260528, openocd20250707→20260831; cmake/ninja/ulp unchanged), source tree commitfcae3288→880a203awith 18 of 23 gitlinks re-hashed, the Python lock re-resolved against v5.5.6's constraints (esptool 4.14.0), and installed sizes re-measured withdu -sb(method validated by reproducing v5.5.1's committed xtensa constant byte-for-byte). v5.5.6 also publishes a linux-arm64 ninja, so an arm64 Linux host can now pin every component.Verified here:
fbuild-toolchainlib 214 passed / 0 failed / 6 ignored;fbuild-build-esplib 269 passed / 0 failed / 7 ignored; fmt clean; boundaryrows=0; dylint_rows=0.Still open on this issue: the five-chip delegated e2e runs (each installs 1.8-2.8 GB and runs a real
idf.pybuild — all#[ignore]; the rev-3 refusal e2e became a two-board build proof assertingCONFIG_ESP32P4_REV_MIN_FULL=300and=0), plus the released footprint table indocs/reference/platformio-ini.md.zackees commentedon Nov 23, 2026
Stage delivered: PR #2163 — and it fixes a regression #2161 introduced.
#2161 wrote the P4
SDKCONFIG_DEFAULTSentry into<build>/idf, the directoryidf.pyowns.idf.py set-targetimpliesfullclean, which IDF refuses to run on a non-empty directory that is not a CMake build tree, so every ESP32-P4 delegated build died atset-targetbefore compiling anything. Non-P4 chips were unaffected (no family defaults → empty build root), and the unit tests only ever checked the file's name and content, so #2161's suite stayed green.#2163 moves the defaults to
<build>/fbuild-idf-defaults/(sibling of the IDF build root) and adds a placement test.Measured here, linux-amd64, v5.5.6 pin,
FBUILD_IDF_PROOF_CACHE:espidf_riscv_component_project_builds_for_both_p4_silicon_families: FAILED 27.18 s (set-targetexit 2) before, ok 77.04 s after — rev-3 image hasCONFIG_ESP32P4_REV_MIN_FULL=300, pre-rev-3 board=0.This also closes the issue's last AC, the footprint re-measure (
du -sbover the install cache): 2.10 GB for Xtensa and 3.09 GB for RISC-V, against the 1.8 / 2.8 GB the reference doc carried. Table updated indocs/reference/platformio-ini.md; the design note keeps its v5.5.1 measurement and records the re-measure beside it. Still oneIDF_RELEASE_VERSION— no second pin.#2133closes when #2163 merges.