chore(cmake): replace dfu-util with rs-dfu for STM32 flash targets - #7789
Merged
Merged
Conversation
dfu-util hardcoded 0x08000000 for the flash/flash-bl targets, which is wrong for H7 boards whose firmware lives in external QSPI/XSPI flash, and there was no flash target at all for boards that only produce a firmware.uf2. Switch flash/flash-bl to the rdfu CLI (already used by Companion via rs-dfu), and add a flash-uf2 target for FIRMWARE_FORMAT_UF2 boards. Confirmed on real hardware that FIRMWARE_QSPI boards (external QSPI/XSPI firmware, e.g. GX15) can only be flashed via flash-uf2: the bootloader's DFU interface doesn't expose the QSPI region as a directly-addressable segment, only reachable via the reboot sequence a UF2 write triggers - no raw-.bin flash address works there, so flash is skipped for those boards entirely. rdfu is resolved (find_program, falling back to downloading a release binary) at build time via RunRdfuCli.cmake, not at configure time, so ordinary firmware builds never touch it unless a flash target is run. Fixes EdgeTX#7210 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Replaces dfu-util with the rdfu CLI (EdgeTX/rs-dfu) for the flash/flash-bl cmake targets, fixes the flash address for QSPI-firmware H7 boards, and adds a flash-uf2 target for FIRMWARE_FORMAT_UF2 boards. rdfu is resolved (or fetched) at build time, not configure time, so it's never touched unless a flash target is actually run.
Verified on real hardware: F4 (V16) via flash, and QSPI/UF2 (GX15) via flash-uf2 - which is the only valid firmware-flash path on QSPI boards, since the bootloader doesn't expose that region as a DFU segment until a UF2 write triggers its reboot sequence.
Closes #7210
Companion dev-image cleanup: EdgeTX/build-edgetx#56