Skip to content

fix(build): require mbedtls explicitly and build QEMU firmware in CI - #41

Merged
raffmont merged 1 commit into
mainfrom
claude/amazing-jepsen-a80576
Oct 8, 2026
Merged

raffmont merged 1 commit into
mainfrom
claude/amazing-jepsen-a80576

Conversation

@raffmont

@raffmont raffmont commented Oct 5, 2026

Copy link
Copy Markdown

Problem

python3 -m prg32 qemu build fails on a fresh clone of main (a8669e5) with ESP-IDF v5.4:

components/prg32/prg32_store.c:10:10: fatal error: esp_crt_bundle.h: No such file or directory
components/prg32/prg32_setup_store.c:13:10: fatal error: esp_crt_bundle.h: No such file or directory

esp_crt_bundle.h is provided by mbedtls, which was missing from PRG32_PRIV_REQUIRES. On esp32c6 the header is reachable transitively through esp_websocket_client / mdns (appended only for that target), so the hardware build worked. On the esp32c3 QEMU target it is not reachable.

CI did not catch this because esp-idf-build only builds esp32c6.

Changes

  • components/prg32/CMakeLists.txt: add mbedtls to PRG32_PRIV_REQUIRES.
  • .github/workflows/ci.yml: new esp-idf-qemu-build job running python3 -m prg32 qemu build in espressif/idf:v5.4.1.
  • Docs: explicit-requirement rule in docs/usage/qemu.md, a troubleshooting entry, CI coverage note in docs/software/cartridges.md, and docs/repository_structure.md.

Validation (local, macOS, ESP-IDF v5.4)

  • python3 -m prg32 qemu build: passes (firmware, qemu_flash.bin, efuse image).
  • python3 -m prg32 esp32c6 build: passes.
  • git diff --check, compileall, prg32 doctor, prg32.esp32c6.ci_smoke_test, prg32 abi check, devicedemo / bachdemo / poing checks, blackjack rules test and SHA256SUMS: all pass.
  • python3 -m prg32 test: the 74 unit tests pass; its final QEMU smoke stage could not complete in a non-interactive shell (idf.py qemu monitor requires a TTY). Its build stages (set-target, build-firmware, build-demo-cartridge) passed.

The new CI job has not run yet; this PR is its first run.

🤖 Generated with Claude Code

prg32_store.c and prg32_setup_store.c include esp_crt_bundle.h, which is
provided by the mbedtls component, but PRG32_PRIV_REQUIRES did not list
it. The ESP32-C6 build reached the header transitively through
esp_websocket_client and mdns; the ESP32-C3 QEMU build did not, so
`python3 -m prg32 qemu build` failed on a fresh clone.

- Add mbedtls to PRG32_PRIV_REQUIRES.
- Add an `esp-idf-qemu-build` CI job that runs `python3 -m prg32 qemu build`,
  since CI previously built only the esp32c6 target.
- Document the explicit-requirement rule and the new CI coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raffmont
raffmont merged commit 38157fb into main Oct 8, 2026
4 checks passed
@raffmont
raffmont deleted the claude/amazing-jepsen-a80576 branch October 8, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant