Skip to content

Add a script to clean-flash ESP32-C3 firmware - #61

Open
EdwardChamberlain wants to merge 1 commit into
mainfrom
feat/issue-60-flash-firmware
Open

EdwardChamberlain wants to merge 1 commit into
mainfrom
feat/issue-60-flash-firmware

Conversation

@EdwardChamberlain

Copy link
Copy Markdown
Owner

Add scripts/flash_firmware.py so a local MicroPython .bin image can be flashed with one command instead of manually running erase/write commands. The script requires --clean, validates the ESP32-C3 image header/checksum/hash before contacting the board, supports --device, and refuses ambiguous automatic port selection. It uses esptool's write-flash --erase-all to check compatibility, erase, write and verify over one connection, with non-zero exits on failure.

Update the README with firmware flashing, configuration backup/restore and application reinstallation instructions. This preserves the clean USB/OTA boundary tracked in #46 and #48.

Validation:

  • 190 tests passed, including 23 new firmware-script tests; the new script has 100% statement and branch coverage, and the repository coverage gate passes at 78.6%.
  • Full lint, Python compilation and git diff --check passed.
  • Wheel and source distribution built and passed installed-resource smoke checks; the source distribution contains the final script.
  • Physical ESP32-C3 re-flashing has not been performed and remains to be verified on hardware.

Closes #60.

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.

[FEAT] Add a script to re-flash the board from a firmware file

1 participant