Skip to content

flasher: ISP Production builds (v0.3.1 + v0.2.1) as top local entries - #124

Merged
mbreiser merged 1 commit into
mainfrom
flasher/isp-production-builds
Jun 30, 2026
Merged

flasher: ISP Production builds (v0.3.1 + v0.2.1) as top local entries#124
mbreiser merged 1 commit into
mainfrom
flasher/isp-production-builds

Conversation

@mbreiser

Copy link
Copy Markdown
Contributor

What

Make v0.3.1 ISP Production and v0.2.1 ISP Production the first two entries in the WebUSB flasher's build dropdown, served from UF2s committed in-repo.

The firmware repo's GitHub Pages catalog (manifest.json) publishes Production + BCM self-test builds but no ISP/OTA build, so the production-with-ISP firmware can't be flashed from the published manifest. This ships those two images alongside the flasher.

Dropdown after this change

Local builds (Production + ISP)
  ● v0.3.1 ISP Production   -> firmware/g6-panel-v0.3.1-isp.uf2   (selected default)
  ○ v0.2.1 ISP Production   -> firmware/g6-panel-v0.2.1-isp.uf2
Production firmware                 (unchanged, from the remote Pages catalog)
  ○ v0.3.1 — Production
  ○ v0.2.1 — Production
Panel self-test
  ○ v0.3.1 — BCM self-test
  ○ v0.2.1 — BCM self-test

Changes

  • flasher/firmware/g6-panel-v0.3.1-isp.uf2, g6-panel-v0.2.1-isp.uf2 — new, 262144 bytes each. Built from the firmware repo's panel-isp branch with PlatformIO 6.1.19 (the version pixi pins) via pio run -d panel -e pico_v031 -e pico_v021 — the same build as pixi run build31/build21, invoked directly because pixi.toml is platforms=["linux-64"] and won't solve on macOS. Both images compile src/isp.cpp + PicoOTA + LittleFS (ISP/OTA included; full production code, not the SD-card make_isp_image.py footer path).
  • flasher/flasher.js — merge a local LOCAL_BUILDS list ahead of the remote catalog:
    • local: trueonFlashClick() fetches file relative to this page (same-origin, no CORS) instead of from FW_BASE.
    • section pins them to their own optgroup at the top; default: true selects v0.3.1 ISP.
    • The remote catalog is now best-effort (local builds still flash if Pages is unreachable), and a remote default is cleared so the local default wins (a <select> keeps the last selected option).
  • flasher/index.html — footer bump to v0.2.

Verification

  1. Ran the real flasher.js under DOM/fetch stubs against the live manifest — 18 assertions: optgroup/entry order, exactly one selected default (remote default cleared), and onFlashClick resolving the local UF2 same-origin (relative path, never under FW_BASE).
  2. Served the tree over HTTP — the exact resolved paths (flasher/firmware/*.uf2) return HTTP 200 with valid UF2 magic (5546320a), 262144 bytes, and served SHA-256 == committed SHA-256.

SHA-256: b2f06b70…acd8e (v0.3.1), d4d97559…f680 (v0.2.1).

Branched off main; independent of other in-flight work (touches only flasher/).

🤖 Generated with Claude Code

The firmware repo's GitHub Pages catalog has no ISP/OTA build, so the
production-with-ISP panel firmware can't be flashed from the published
manifest. Ship those two images with the flasher instead.

- Commit the UF2s under flasher/firmware/ (g6-panel-v0.3.1-isp.uf2,
  g6-panel-v0.2.1-isp.uf2). Built from the firmware repo's panel-isp
  branch with PlatformIO 6.1.19 (the version pixi pins) via
  `pio run -d panel -e pico_v031 -e pico_v021` — i.e. the same build as
  `pixi run build31`/`build21`, run directly because pixi.toml is
  platforms=["linux-64"] and won't solve on this host. Both images
  compile src/isp.cpp + PicoOTA + LittleFS (ISP/OTA in, production code).

- flasher.js: merge a local LOCAL_BUILDS list ahead of the remote
  catalog. Local builds carry local:true (onFlashClick fetches `file`
  relative to this page — same-origin, no CORS) and a `section` that
  pins them to their own optgroup at the top of the dropdown, with
  v0.3.1 ISP Production as the selected default. The remote catalog is
  now best-effort (local builds still flash if Pages is unreachable),
  and a remote `default` is cleared so the local default wins.

- Bump the flasher footer to v0.2.

Verified by running the real flasher.js under DOM/fetch stubs against the
live manifest (dropdown order, single default, same-origin resolution)
and by serving the tree over HTTP (resolved UF2 paths 200 + byte-match).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mbreiser
mbreiser merged commit 6823696 into main Jun 30, 2026
@mbreiser mbreiser mentioned this pull request Jun 30, 2026
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