Repository navigation
List the MCUboot update image for an nRF52 build that also has a UF2 - #2852
Conversation
An nRF52 build with the mcumgr OTA chains MCUboot behind the Adafruit bootloader, so it produces a UF2 and zephyr/app_update.bin. get_download_types lists the update image only when there is no UF2, which left the frontend's MCUboot updates with nothing to download.
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Only nit-level documentation refinements remain, with no blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
Adds MCUboot zephyr/app_update.bin to firmware downloads when present alongside UF2 artifacts.
Changes:
- Discovers and deduplicates the MCUboot update image.
- Adds coverage for presence, absence, and duplicate scenarios.
- Documents the expanded firmware artifact list.
| File | Summary | Final review comments |
|---|---|---|
tests/controllers/firmware/test_get_binaries.py |
Tests MCUboot artifact handling. | Two nit comments (1 vote each): shorten docstrings to one-line behavior contracts. |
esphome_device_builder/controllers/firmware/download.py |
Discovers the MCUboot update image. | One nit comment (1 vote): make the comment state the concise invariant. |
docs/API.md |
Documents the new downloadable artifact. | None. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2852 +/- ##
=======================================
Coverage 99.75% 99.75%
=======================================
Files 295 295
Lines 25562 25565 +3
=======================================
+ Hits 25500 25503 +3
Misses 62 62
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
What does this implement/fix?
Lists
zephyr/app_update.bininfirmware/get_binarieswhenever it is on disk.An nRF52 build with the mcumgr OTA chains MCUboot behind the Adafruit bootloader, so it produces a UF2 and the update image. ESPHome's
get_download_typeslisted the image only when there is no UF2, so the frontend's MCUboot updates had nothing to download on those boards. That is fixed in esphome/esphome#19769, which is in dev and not in a release yet; this covers ESPHome 2026.9 and older.Same approach as
firmware.elf, which is already appended here.Related issue or feature (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Checklist
ruff,codespell, yaml/json/python checks).tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited (regenerate viascript/sync_components.pyif a sync is needed).docs/ARCHITECTURE.mdand/ordocs/API.md.