Build node/ and collector/ with mpy-cross + circup; record results - #10
Build node/ and collector/ with mpy-cross + circup; record results#10tyeth wants to merge 6 commits into
Conversation
|
Pushed two commits ( New workflow: Action required: add a repository secret before this workflow can pass Revised CI-asset section in Pico 2 W firmware run is dispatched but not complete 🤖 Generated with Claude Code |
|
Correction to the comment above: the Pico 2 W firmware run has now finished, and it failed. Pushed Run 34258666665 — Root cause: the CI-only To actually get the asset (not done here — it means pushing to Everything else in the previous comment stands: the workflow, the 🤖 Generated with Claude Code |
|
CI is green on this PR. 🤖 Generated with Claude Code |
|
The Pico 2 W firmware CI asset now exists. Run 34262269542 succeeded and produced The earlier run failed because the CI-only Two caveats that still apply to that artifact, tracked as tyeth/circuitpython#12: it is BLE-capable only because of the CI-only manifest override, which must not be merged; and it depends on The whole Bluetooth effort — every PR and open issue across the four forks — is now tracked in tyeth/circuitpython#15. Both Pico W and Pico 2 W BLE are verified working on hardware. 🤖 Generated with Claude Code |
|
Correction to the "Prerequisite CircuitPython fork branch" section (2026-09-09). Two statements in the body are now out of date; leaving the history as written and recording the current state here.
Everything else in the body still holds: mpy-cross only proves compiler acceptance, and both trees as they stand on |
tools/build_bundle.sh byte-compiles node/ and collector/ with mpy-cross, stages each tree's libraries with circup --path, and compiles the libraries that only ship as .py (the SEN5x custom bundle has no 10.x-mpy build). build_results.md records one run against the mpy-cross from tyeth/circuitpython run 34253440312 (10.3.0-alpha.4-73-gf1ae373ad0): all 23 device sources compile, all 19 requested libraries resolve. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add .github/workflows/build-bundle.yml, which runs tools/build_bundle.sh on pushes to main, pull requests and on demand: it fetches mpy-cross from a tyeth/circuitpython Actions run, byte-compiles node/ and collector/, stages their libraries with circup and uploads the result as an artifact. Cross-repo artifact download needs a token with Actions: read on tyeth/circuitpython, so the workflow consumes a CP_CI_TOKEN repository secret rather than the job-scoped GITHUB_TOKEN; permissions are contents: read only. Rework the CI-asset section of build_results.md: separate the mpy-cross run (34253440312, red overall but with usable mpy-cross artifacts) from the Pico 2 W firmware run (34258666665, "Build board (custom)" on the CI-only branch ci/pico2w-ble-assets), record that the latter was still queued with no artifact or result at the time of writing, explain why ci/pico2w-ble-assets must not be merged, and document how to create CP_CI_TOKEN. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The run was created at 17:41Z and checked at 17:53Z, so it had been queued for about twelve minutes, not roughly an hour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…artifact
The previous revision captured the run while it was still queued. It has
since run and failed after 5m49s in "Set up port" (west update):
--- hal_rpi_pico: fetching, need revision integration-pico2w-ble
fatal: couldn't find remote ref integration-pico2w-ble
ERROR: update failed for project hal_rpi_pico
The CI-only west.yml override on ci/pico2w-ble-assets points hal_rpi_pico
at tyeth/hal_rpi_pico@integration-pico2w-ble, which was never pushed; the
fork only has the two PR head branches (cyw43-shared-bus-ble,
flash-ram-helpers-force-inline). The zephyr and hal_infineon fork refs
resolved. The build step never ran, so no
raspberrypi_rpi_pico2_w_zephyr-en_US-latest artifact exists and the .uf2
still has to be built locally.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
108d7e7 to
02a23c7
Compare
The firmware run this file recorded as failed has been superseded: the integration-pico2w-ble branch it was missing now exists on tyeth/hal_rpi_pico, and Build board (custom) produces both Pico 2 W (34467425010) and Pico W (34494018766) firmware. Take mpy-cross from the latter -- it is green, expires two days later, and is the same build as the firmware. Both compilers emit mpy v6.3, so no compiled output changes. The 'otherwise-red run' caveat is also gone: tests / zephyr is green again (tyeth/circuitpython#11). The custom bundle's missing 10.x-mpy turned out to be a build bug, not a dormant repo: its build.sh passes --package_folder_prefix wrapped in literal quotes, which startswith() then never matches, so both libraries fell back to autodetection and the bundle shipped only conftest. Fixed in good-enough-technology/CircuitPython_GoodEnough_Bundle#1; the 10.x-mpy reaches circup once that is merged and released. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured after writing it down. adafruit/CircuitPython_Community_Bundle builds a byte-identical bundle with and without the fix (1788 files), because package_folder_prefix is only consulted by legacy autodetection and only 11 of its 47 prefix entries still reach that path -- the rest declare tool.setuptools.packages in pyproject.toml. The two damaged entries are currently not among the 11. It is total in our custom bundle for two compounding reasons, now both stated: two libraries means both entries are damaged, and the Sensirion drivers carry no [tool.setuptools] metadata so they depend on the prefix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Summary
Attempted a full "build" of both example trees —
node/(remote sensor node) andcollector/(host controller) — meaning: byte-compile every device source withmpy-cross, stage the libraries from eachrequirements-circup.txtwithcircup --path, and compile any library that only ships as.py. No hardware was initially involved.Adds
tools/build_bundle.sh(the reproducible version of what was run) andbuild_results.md(the record of this run).build/andvenv/are gitignored.What actually built
mpy-cross:
CircuitPython 10.3.0-alpha.4-73-gf1ae373ad0 on 2026-09-08; mpy-cross emitting mpy v6.3(x86-64 Linux), downloaded from tyeth/circuitpython Actions run 34253440312. Its output headers match the Adafruit bundle's10.x-mpyfiles byte-for-byte (43 06 00 1f).circup 3.0.4, bundles: Adafruit 20260905 (
10.x-mpy), Community 20260826, good-enough-technology 202311252150.node/lib/= 74 files, 484 KBcollector/lib/= 66 files, 332 KBLibrary versions are listed in
build_results.md. Informationally,examples/(5) andtools/(9) also pass mpy-cross.What failed / needs attention
Nothing failed outright. Two things that are not clean:
10.x-mpyplatform. circup logsThere was a problem downloading the '10mpy' platform for the 'good-enough-technology/circuitpython_goodenough_bundle' bundle. Falling back to source (.py) files.and installssensirion_i2c_sen5x+sensirion_i2c_driveras.pytrees. All 22 of those files compile with this mpy-cross, so they will load, but they cost flash/RAM that.mpywould not. circup also warnscircuitpython_sensirion_i2c_driver is not a known CircuitPython library— a dependency-name mismatch in that bundle's metadata; the real dependency was still installed.boot_out.txtfiles pin circup to 10.3.0-alpha.4; circup reports 10.3.0 final is out. Libraries were resolved against the latest bundles, not whatever is on the bench boards.Not covered: nothing was flashed or run. The runtime issues in
bugs_issues_and_todos.md(C6start_aphard fault, BLE/AP coexistence, ESP-NOW0x3067 NO_MEM) are unchanged and unverified here. mpy-cross only proves syntax/compiler acceptance — a CircuitPython build missingespnow,_bleio, oralarmwould still fail at import.Prerequisite CircuitPython fork branch (BLE on Raspberry Pi Pico 2 W)
The mpy-cross used here comes from CI of branch
zephyr-pico2w-bleontyeth/circuitpython(tyeth/circuitpython#4). That branch adds a CYW43439 shared-gSPI-bus HCI driver so the Pico 2 W gets BLE underports/zephyr-cp. It is stacked on tyeth/circuitpython#5 and depends on companion module PRs:What that CI run actually provides, accurately: run 34253440312 produces only
mpy-crossartifacts —mpy-cross,mpy-cross.static,mpy-cross.static-aarch64,mpy-cross.static-raspbian,mpy-cross.static.exe,mpy-cross-macos-arm64. There is no Pico 2 W firmware artifact; the.uf2must be built locally fromports/zephyr-cpwithmake BOARD=raspberrypi_rpi_pico2_w_zephyr. The run's overall conclusion is failure — itstests / zephyrjob fails — so these mpy-cross binaries come from an otherwise-red run.Relevance to this repo: both examples target ESP32 Feathers (C6/S3/S2) and are built around ESP-NOW, which the Pico 2 W does not have. The Pico 2 W BLE work is relevant to the BLE UART path only (
collector/net_ble.py,node/net_ble.py,adafruit_ble) — not to the ESP-NOW mesh.Reproduce
🤖 Generated with Claude Code