slint-ui/slint · warning
home-automation ESP32-P4 failed
Error message
home-automation ESP32-P4 failed: ${e.cmd} exited with ${e.returncode} What it means
In build_p4, if any idf.py invocation (build or flashing-stage command like @flash_args) exits non-zero, the script warns 'home-automation ESP32-P4 failed: <cmd> exited with <returncode>' and returns the esp32-p4-function-ev-board feature in its failed list. Like build_mcu, the failure is recorded rather than raised, so other images still build and demos.json generation can proceed.
Solutions
- Inspect the idf.py output above the warning for the root cause and fix the project/environment
- Ensure ESP-IDF >= 6.0 is active (idf.py --version) with the esp32p4 target installed
- Re-run idf.py fullclean in demos/home-automation/esp-idf then rebuild
- Continue without the P4 image if not needed — the failure only omits it from demos.json
Defensive patterns
Strategy: try-catch
Validate before calling
. ~/esp/esp-idf/export.sh && idf.py --version && idf.py set-target esp32p4 # pre-validate before the scripted build
Try / catch
try:
subprocess.run(cmd, cwd=directory, env=env, check=True)
except subprocess.CalledProcessError as e:
warn(f"home-automation ESP32-P4 failed: {' '.join(e.cmd)} exited with {e.returncode}")
return [], ["esp32-p4-function-ev-board"] Prevention
- Use ESP-IDF >= 6.0 with esp32p4 target support installed
- Run idf.py fullclean after switching ESP-IDF versions
- Validate the home-automation ESP-IDF project compiles in its own CI job
- Keep the ESP-IDF python venv dependencies up to date
When it happens
Trigger: idf.py build (or the subsequent flash-args command run in demos/home-automation/esp-idf/build) returns a non-zero exit code — compile error in the ESP-IDF project, wrong ESP-IDF version (< 6.0), missing chip support target, or failing CMake configuration.
Common situations: ESP-IDF version too old for ESP32-P4 support; uncommitted/broken home-automation demo code; missing ESP-IDF python dependencies in the activated env; out-of-disk during the P4 build.
Related errors
- idf.py not found, skipping ESP32-P4 home-automation (needs…
- failed: exited with
- cargo failed
- failed ( )
- demos.json is incomplete, these boards failed to build
AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16).
Data as JSON: /api/errors/ff5db2d4d7ea8b9b.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/build-demo-images.py:329
run(
[
"python",
"-m",
"esptool",
"--chip",
"esp32p4",
"merge_bin",
"-o",
str(out / image),
"-f",
"raw",
"@flash_args",
],
cwd=directory / "build",
env=env,
)
except subprocess.CalledProcessError as e:
warn(
f"home-automation ESP32-P4 failed: {' '.join(e.cmd)} exited with {e.returncode}"
)
return [], ["esp32-p4-function-ev-board"]
return [
{
"feature": "esp32-p4-function-ev-board",
"name": "ESP32-P4 Function EV",
"method": "esp",
"file": image,
"chip": "esp32p4",
"offset": "0x0",
"demo": "home-automation",
}
], []
def emit_demos_json(out: Path, base: str, records: list[dict]) -> None:
log(f"writing {out / 'demos.json'}")View on GitHub (pinned to bb937076de)