feat: add UF2 uploader for CDC-touch bootloaders - #122
Open
cumin777 wants to merge 2 commits into
Open
Conversation
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
Add
uf2upload, a self-contained C++17 host uploader for STM32 boards usinga USB CDC 1200-bps touch and UF2 mass-storage bootloader.
This PR implements the following features:
.binimage to UF2 with board-supplied address,family ID and maximum-size validation
and wait for the bootloader volume before copying the UF2 image
Arduino_Core_STM32 can describe an UF2 upload recipe, but STM32Tools currently
has no uploader that can perform the complete CDC-touch, UF2 conversion and
mass-storage-copy flow. This tool provides that missing user-facing upload
path without requiring Python or shell dependencies at upload time.
On Windows,
uf2uploadtolerates the transient serial error caused by theexpected reset after the 1200-bps touch and continues waiting for the UF2 volume.
Validation
Validated on a Seeed XIAO STM32C5 running the TinyUF2 bootloader:
XIAOC5BOOTvolume is already mountedbootloader entry, UF2 conversion and copy
The Windows and Linux x86_64 artifacts are included. macOS build integration is
included, but a macOS artifact and hardware validation are not part of this PR.
CI and AStyle checks are pending GitHub Actions.