Skip to content

Skip deck firmware that is already up to date - #16

Merged
evoggy merged 1 commit into
mainfrom
evoggy/deck-flash-skip-up-to-date
Sep 24, 2026
Merged

evoggy merged 1 commit into
mainfrom
evoggy/deck-flash-skip-up-to-date

Conversation

@evoggy

@evoggy evoggy commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Flashing a Crazyflie with a Lighthouse deck attached failed with Section cannot reset to bootloader and aborted the whole run, including decks queued after it.

That is not an error state. The Lighthouse deck has no commandResetToBootloader, and lighthouseDeckFlasherCheckVersionAndBoot() only leaves it in its bootloader when the bitstream CRC does not match the one the firmware requires — which is also the only time it sets UPGRADE_REQUIRED. A Lighthouse deck that is running is therefore already carrying the bitstream we would have flashed.

This applies the same rule cfloader uses in crazyflie-lib-python: a deck that can be commanded into its bootloader always is, a deck that cannot is only flashed when it reports UPGRADE_REQUIRED. Note the bit cannot be used on its own — the Lighthouse driver is the only one in the firmware that ever sets it, so keying solely off it would silently skip the AI deck, bcCam and the color-LED decks.

A skipped deck needs no restart either, so the reboot and the 3–7 s restart delay are now only done when something was actually written.

Fixes #6

The Lighthouse deck cannot be commanded into its bootloader, and the
firmware only leaves it there when its bitstream is out of date. A
running deck is therefore already up to date, so skip it rather than
failing the whole flash run. Skip the reboot too when nothing was
written.

Fixes #6
@evoggy
evoggy merged commit f35f930 into main Sep 24, 2026
1 check passed
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.

Bootloading CF with LH deck attached shows error

1 participant