Skip to content

chore(cmake): replace dfu-util with rs-dfu for STM32 flash targets - #7789

Merged
pfeerick merged 1 commit into
EdgeTX:mainfrom
pfeerick:pfeerick/rs-dfu-flash-7210
Sep 20, 2026
Merged

pfeerick merged 1 commit into
EdgeTX:mainfrom
pfeerick:pfeerick/rs-dfu-flash-7210

Conversation

@pfeerick

@pfeerick pfeerick commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

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

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>
@pfeerick pfeerick added this to the 3.0 milestone Sep 15, 2026
@pfeerick pfeerick added compilation Related to compiling the firmware and firmware options house keeping 🧹 Cleanup of code and house keeping and removed compilation Related to compiling the firmware and firmware options labels Sep 15, 2026
@pfeerick
pfeerick merged commit 850ae73 into EdgeTX:main Sep 20, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

house keeping 🧹 Cleanup of code and house keeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: replace dfu-util with rs-dfu for STM32 flash targets

1 participant