Repository navigation
fix(espidf): keep the P4 silicon defaults out of idf.py's build root (#2133) - #2163
Merged
Merged
Conversation
`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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#2161 (the first stage of #2133) wrote the fbuild-owned
SDKCONFIG_DEFAULTSentry for the ESP32-P4 silicon family into
<build>/idf— the directoryidf.pyitself owns.idf.py set-targetimpliesfullclean, and IDF refusesto clean a non-empty directory that is not a CMake build tree:
So every ESP32-P4 delegated build failed at
set-target, before a singlecompile. 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, asibling 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--ignored)espidf_riscv_..._for_both_p4_silicon_familiesidf.py set-targetexit 2espidf_component_project_builds_and_publishes_artifacts(esp32s3)..._for_esp32c3+..._for_esp32c5+..._for_esp32c6The P4 proof asserts the generated
sdkconfigcarriesCONFIG_ESP32P4_REV_MIN_FULL=300foresp32p4-r3and=0for thepre-rev-3 board, on the same release.
Gates:
fbuild-build-esplib 270 passed / 0 failed / 7 ignored; clippy--all-targets -D warningsexit 0;fmt --checkexit 0; boundaryrows=0; dylint_rows=0plus 14 boundary unittests OK.Footprint re-measure (AC: installed-size constants + footprint table)
du -sbover 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):
esp32s3): + xtensa-esp-elf 1.16 → 2.10 GB (doc said ~1.8)c3/c5/c6/p4): + riscv32-esp-elf 2.14 → 3.09 GB (doc said ~2.8)docs/reference/platformio-ini.mdnow carries the measured figures and themethod; the design note keeps its original v5.5.1 measurement and records the
re-measure beside it.
#2133 acceptance criteria
esp32p4-r3refused under v5.5.1 — met historically (that is what thepin move replaced).
esp32p4-r3builds withCONFIG_ESP32P4_REV_MIN_FULL=300;esp32p4still builds with the pre-rev-3 range — the P4 e2e above.
above.
above.
IDF_RELEASE_VERSION/IDF_RELEASE_COMMIT.Closes #2133.