Skip to content

fix(espidf): keep the P4 silicon defaults out of idf.py's build root (#2133) - #2163

Merged
zackees merged 1 commit into
mainfrom
agent/2133-p4-defaults-placement
Nov 23, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/2133-p4-defaults-placement

Conversation

@zackees

@zackees zackees commented Nov 23, 2026

Copy link
Copy Markdown
Member

What

#2161 (the first stage of #2133) wrote the fbuild-owned SDKCONFIG_DEFAULTS
entry for the ESP32-P4 silicon family into <build>/idf — the directory
idf.py itself owns. idf.py set-target implies fullclean, and IDF refuses
to clean a non-empty directory that is not a CMake build tree:

Directory '<build>/idf' doesn't seem to be a CMake build directory.
Refusing to automatically delete files in this directory. Delete the directory
manually to 'clean' it.

So every ESP32-P4 delegated build failed at set-target, before a single
compile. Non-P4 chips are unaffected (no family defaults, so the build root is
still empty), which is why the unit suite stayed green: the helper tests
asserted the file's name and content, never that the IDF build root stays the
thing fbuild created (empty).

Fix: write the defaults to <build>/fbuild-idf-defaults/<family>.defaults, a
sibling of the IDF build root, and keep the invariant in a test. Also carries
#2133's last outstanding cell — the re-measured first-install footprint.

Evidence — real runs, linux-amd64, v5.5.6 pin, FBUILD_IDF_PROOF_CACHE

delegated e2e (--ignored) before after
espidf_riscv_..._for_both_p4_silicon_families FAILED 27.18 s, idf.py set-target exit 2 ok 77.04 s
espidf_component_project_builds_and_publishes_artifacts (esp32s3) — ok 168.97 s (cold install)
..._for_esp32c3 + ..._for_esp32c5 + ..._for_esp32c6 — 3 passed, 69.21 s

The P4 proof asserts the generated sdkconfig carries
CONFIG_ESP32P4_REV_MIN_FULL=300 for esp32p4-r3 and =0 for the
pre-rev-3 board, on the same release.

Gates: fbuild-build-esp lib 270 passed / 0 failed / 7 ignored; clippy
--all-targets -D warnings exit 0; fmt --check exit 0; boundary
rows=0; dylint_rows=0 plus 14 boundary unittests OK.

Footprint re-measure (AC: installed-size constants + footprint table)

du -sb over the install cache at the v5.5.6 pin. Shared by both profiles —
source tree 0.43 GB, Python env 0.32, CMake 0.15, esp32ulp-elf 0.03,
openocd 0.008, esp-rom-elfs 0.009, ninja 0.0003 (0.95 GB total):

  • Xtensa (esp32s3): + xtensa-esp-elf 1.16 → 2.10 GB (doc said ~1.8)
  • RISC-V (c3/c5/c6/p4): + riscv32-esp-elf 2.14 → 3.09 GB (doc said ~2.8)

docs/reference/platformio-ini.md now carries the measured figures and the
method; the design note keeps its original v5.5.1 measurement and records the
re-measure beside it.

#2133 acceptance criteria

  • RED: esp32p4-r3 refused under v5.5.1 — met historically (that is what the
    pin move replaced).
  • GREEN: esp32p4-r3 builds with CONFIG_ESP32P4_REV_MIN_FULL=300; esp32p4
    still builds with the pre-rev-3 range — the P4 e2e above.
  • esp32s3, esp32c3, esp32c5, esp32c6 delegated e2e on the new pin — the table
    above.
  • Installed-size constants and the footprint table re-measured — the section
    above.
  • No second IDF release pinned — one IDF_RELEASE_VERSION /IDF_RELEASE_COMMIT.

Closes #2133.

`idf.py set-target` implies `fullclean`, and IDF refuses to clean a
non-empty directory that is not a CMake build tree. PR #2161 wrote its
fbuild-owned `SDKCONFIG_DEFAULTS` entry into `<build>/idf`, so every
ESP32-P4 family build died at `set-target` with "Directory ... doesn't
seem to be a CMake build directory. Refusing to automatically delete
files in this directory." The first real run of the ESP32-P4 e2e proved
it: exit 2 before anything was built.

Write the defaults into a sibling directory (`<build>/fbuild-idf-defaults`)
instead, so the IDF build root stays exactly as fbuild created it: empty.

Measured with FBUILD_IDF_PROOF_CACHE on the v5.5.6 pin, linux-amd64:

- before: espidf_riscv_component_project_builds_for_both_p4_silicon_families
  FAILED in 27.18 s (`idf.py set-target` exit 2, fullclean refused);
- after: the same test is ok in 77.04 s, with the rev-3 image carrying
  CONFIG_ESP32P4_REV_MIN_FULL=300 and the pre-rev-3 board `=0`;
- all five chip proofs pass on the new pin: esp32s3 168.97 s,
  esp32p4 both families 77.04 s, esp32c3 + c5 + c6 69.21 s;
- first-install footprint re-measured with `du -sb`: 2.10 GB (Xtensa) and
  3.09 GB (RISC-V) against the 1.8 / 2.8 GB the reference doc carried.

Gates: fbuild-build-esp lib 270 passed / 0 failed / 7 ignored; clippy
--all-targets -D warnings exit 0; fmt exit 0; boundary rows=0,
dylint_rows=0 plus 14 boundary unittests OK.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 1

Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit fcf09a5 Nov 23, 2026
40 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

feat(espidf): move the delegated ESP-IDF pin to v5.5.2+ so ESP32-P4 rev-3 silicon builds

1 participant