FWDFU pre-update + plan 0004 (SD-direct OTA staging spike) — BETA test vehicle - #118
Merged
Conversation
…e escape hatch) Rebooting with GPREGRET=0x57 (DFU_MAGIC_UF2_RESET, stock on the Adafruit/Seeed bootloader) brings the device up as a USB drive; copying a .uf2 flashes the app region directly - no image-size cap, no staging region, no web/BLE streaming. Deferred to the main loop like every FW command; acknowledges FWDFU:OK before the reboot, cleanly aborts any in-flight OTA first, and uses the same sd_power_gpregret SV-call pattern as the apply path's recovery flag. Groundwork for the SD-staged OTA rework: fleet units that take this update always have a size-unlimited update path over a USB cable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnTP6BdA9xjLR5hSWE9frb
… design) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HnTP6BdA9xjLR5hSWE9frb
Coverage — host-testable units📂 Overall coverage
📄 File coverage
|
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BETA twin of #117 (same
FWDFUcommit, cherry-picked) plusdocs/plans/0004-sd-direct-ota-staging.md— the spike plan for staging OTA images straight from the SD card (/fw/pending.binis already there, verified) so the 320 KB internal-flash staging region can be deleted and the app region grows to ~820 KB. The plan covers the pre-resolved sector-run approach for the RAM flasher, the four Phase-0-style hardware spikes required, and the sequencing (FWDFU now → spike → implement → fallback = staging-layout move).This branch is the test vehicle: bench-verify
FWDFUhere (BLE command →FWDFU:OK→ XIAO-SENSE UF2 drive → drag a.uf2→ flashed; exit-without-flashing boots the app unchanged) before #117 lands on master.Type of change
How it was verified
ctest --test-dir tests/build) — unaffected (no pure-logic change)clang-tidyclean — deferred to CIChecklist
CHANGELOG.mdupdated under[Unreleased](if user-visible)ARCHITECTURE.md/CLAUDE.mdupdated (if a module or interface changed)tests/— N/A (register write + reset)Related issues
Master twin: #117. Design:
docs/plans/0004-sd-direct-ota-staging.md(this PR). Context: #116's OTA size-gate incident.🤖 Generated with Claude Code
https://claude.ai/code/session_01HnTP6BdA9xjLR5hSWE9frb
Generated by Claude Code