diff --git a/.github/workflows/apollo-mled1-build.yml b/.github/workflows/apollo-mled1-build.yml index b8b358f3..7a3636ca 100644 --- a/.github/workflows/apollo-mled1-build.yml +++ b/.github/workflows/apollo-mled1-build.yml @@ -41,11 +41,23 @@ jobs: fi - name: Resolved libraries run: pio pkg list -e apollo_mled1 + # Factory image: flash at 0x0 after full erase + - name: Merge factory image + run: | + b=.pio/build/apollo_mled1 + boot_app0="$HOME/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin" + test -f "$boot_app0" + python "$HOME/.platformio/packages/tool-esptoolpy/esptool.py" --chip esp32 merge_bin \ + -o "$b/MLED-1_full_install.bin" --flash_mode dio --flash_freq 40m --flash_size 8MB \ + 0x1000 "$b/bootloader.bin" 0x8000 "$b/partitions.bin" 0xe000 "$boot_app0" 0x10000 "$b/firmware.bin" + (cd "$b" && sha256sum MLED-1_full_install.bin firmware.bin | tee SHA256SUMS.txt) - uses: actions/upload-artifact@v7 with: name: apollo_mled1-${{ github.sha }} retention-days: 90 path: | + .pio/build/apollo_mled1/MLED-1_full_install.bin + .pio/build/apollo_mled1/SHA256SUMS.txt .pio/build/apollo_mled1/firmware.bin .pio/build/apollo_mled1/firmware.elf .pio/build/apollo_mled1/firmware.map diff --git a/CLAUDE.md b/CLAUDE.md index ad5633ea..ea53c620 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,6 +50,8 @@ AGENTS.md and .github/copilot-instructions.md. (nightly, release, stale, CI). They burn private-repo Actions minutes, and release.yml fires on any tag push. - On every sync, update the WLED version in NOTICE and the README header. +- On every sync, diff esp32dev_8M's inherited lib_deps against the pinned list in + `[env:apollo_mled1]` and re-pin anything upstream changed (DECISIONS MLED-D8). - Never rebase or force-push `main`. ## Building and shipping diff --git a/DECISIONS.md b/DECISIONS.md index 88a0e976..dd62ad81 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -9,6 +9,8 @@ ESP32-PICO-V3-02 (rev v3.1), 8MB embedded flash, 2MB embedded PSRAM, USB-UART br (port shows as /dev/cu.usbserial-*). Env `apollo_mled1` extends upstream `esp32dev_8M` (8MB layout tools/WLED_ESP32_8MB.csv, DIO flash). PSRAM is not enabled yet. Flash at 460800 baud or lower; 921600 fails on this bridge ("Packet content transfer stopped"). +Confirmed on hardware 2026-11-13: the full_install image flashes correctly at 460800 after a +full erase. A Chrome tab using Web Serial can hold the port ("Resource busy"); close it first. ### MLED-D2. LED data pin GPIO13 via DATA_PINS `-D DATA_PINS=13` (guarded in cfg.cpp). LEDPIN no longer exists in 16.x and @@ -42,6 +44,19 @@ First units were flashed from a local build whose firmware files (platformio.ini wled00/set.cpp) are identical to this repo's first Apollo commit. Recipients get the matching source archive (EUPL-1.2 Art. 5) because the repo is still private. +### MLED-D8. Libraries pinned; factory image built in CI +`[env:apollo_mled1]` restates the inherited esp32dev_8M lib_deps in the same order, with the +three moving references pinned to what the first builds resolved: AnimatedGIF 1.4.7 (was +^1.4.7), ESPAsyncWebServer 39b830c8 (was tag v2.4.2), QuickESPNow 2985a4a6 (was branch +optional-debug). Upstream maintainers can no longer change Apollo builds without a merge. +On every upstream sync, diff the inherited list (`pio project config`) and re-pin. +CI also merges the factory image (MLED-1_full_install.bin, bootloader 0x1000, partitions +0x8000, boot_app0 0xe000, app 0x10000; DIO, 40m, 8MB) and uploads it with SHA256SUMS.txt. +CI and local builds of the same commit are functionally identical but not byte-identical +(CI firmware.bin for c3d61f7d is 176 bytes smaller: different build paths and tooling +around the UI build). Record the SHA-256 of whichever image is actually flashed. The +content-creator units carry app 02ab1d76... / full image 8efc1af6... (local build). + ## Open decisions (before the first retail release) - LED defaults: LED type, colour order, default pixel count, and ABL milliamps from the PSU @@ -56,10 +71,6 @@ matching source archive (EUPL-1.2 Art. 5) because the repo is still private. repo is private) and downloads through download.wled.me, which appears to serve only the wled/WLED fork network (probed 2026-11-13). Patch update.htm to Apollo's Pages, or hide the button. -- Pin the git-ref libraries inherited from upstream [env] lib_deps (QuickESPNow branch, - ESPAsyncWebServer tag, AsyncTCP range) to commit SHAs so upstream people cannot change - Apollo builds without a merge. CI's "Resolved libraries" step lists what was used. -- Factory image from CI: add an esptool merge_bin step so full_install.bin comes from CI. - Captive portal: keep upstream behaviour (popup guides setup) or port M-1 D22. - apBehavior and a recommended AP password or settings PIN after setup. - mDNS prefix (needs M-1's WLED_MDNS_PREFIX patch) and PSRAM enablement. diff --git a/platformio.ini b/platformio.ini index f08c1fc9..8827f13c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -906,3 +906,15 @@ build_flags = ${env:esp32dev_8M.build_flags} -D WLED_AP_SSID='"Apollo MLED-1 Hotspot"' -D WLED_AP_PASS='""' ;; open setup hotspot, no password -D DATA_PINS=13 ;; LED data output on IO13 -D WLED_REPO=\"ApolloAutomation/MLED-1\" +;; Inherited lib_deps, same order, git refs pinned +;; Re-check against esp32dev_8M on every upstream sync +lib_deps = + esp32async/AsyncTCP @ 3.4.7 + bitbank2/AnimatedGIF @ 1.4.7 + https://github.com/Aircoookie/GifDecoder.git#bc3af189b6b1e06946569f6b4287f0b79a860f8e + https://github.com/someweisguy/esp_dmx.git#47db25d8c515e76fabcf5fc5ab0b786f98eeade0 + IRremoteESP8266 @ 2.8.2 + https://github.com/Makuna/NeoPixelBus.git#1d7ff38f14d04a976f9c6e365c83a232bcba04fc + https://github.com/Aircoookie/ESPAsyncWebServer.git#39b830c852054444ea12a8b5d7fcb4fa004a89d7 ;; tag v2.4.2 + marvinroger/AsyncMqttClient @ 0.9.0 + https://github.com/blazoncek/QuickESPNow.git#2985a4a6eb67b9f3bc07e7b6b267716ac1b0c4b9 ;; branch optional-debug