Repository navigation
Conversation
The softdevice upgrade needs the bootloader version, reset_to_bootloader() and refresh_info() from bitcraze/cfloader-rs#2, which is not released yet. Point at the PR branch instead of a local path so the branch builds anywhere; switch back to a crates.io release once it is out.
A bundle passed with --bin has no release version, only "custom", which does not parse. The version comparison treated that as unknown and skipped the bundle whenever the device's bootloader reported a version, so the flash reported success without writing anything. A --bin bundle is an explicit request and is now flashed whatever the device runs.
The softdevice upgrade made --platform skip reading the platform from the firmware on a warm flash too, for Crazyflies whose firmware is too old to connect to. Such a Crazyflie is flashed cold instead, which is what the protocol mismatch hint recommends, so go back to using --platform only together with --cold.
A bootloader+softdevice from a release or zip is a released one, but one given with --bin is always flashed and can be anything. If it does not start, the Crazyflie can no longer be flashed over the radio and can only be recovered with an SWD debug probe, so bootload flash and swarm bootload flash now ask first (default no, once for the whole swarm). --accept-bootloader-risk flashes it without asking and is required when running non-interactively. The target, the prompt and the flag are documented in docs/bootload.md.
evoggy
force-pushed
the
evoggy/nrf51-softdevice-upgrade
branch
from
October 7, 2026 18:44
13e3cdc to
faf37ef
Compare
Member
Author
|
This fixes #15 |
This branch has not been deployed
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.
Release archives carry a combined nRF51 bootloader+softdevice binary
(
type: bootloader+softdevice,provides: [sd-s130]), and the nRF51 firmwaredeclares which softdevice it needs (
requires: [sd-s130]). cflib uses this tomove older Crazyflies from S110 to S130 as part of a normal flash. cfcli ignored
the bundle, so it could not bring a Crazyflie that is still on S110 up to date.
bootload flashnow flashes the bundle first when it is needed, then the restof the archive. A Crazyflie that still needs it usually runs firmware too old
for this cfcli to connect to, so it is flashed cold, as the hint from #21
suggests.
When the bundle is flashed
The softdevice on the device is worked out from where its bootloader says the
firmware starts (page 88 = S110, 108 = S130). The bootloader version comes from
the info packet.
error, nothing is flashed.
go forwards, so cfcli never needs to carry an old softdevice.
the device's. The original bootloader reports no version and counts as older
than anything.
--bin nrf51-bootloader+softdevice=<file>has no releaseversion and is always flashed, after a confirmation (below).
If the upgrade is refused, the Crazyflie is restarted into its firmware rather
than left in the bootloader.
Flashing it
This follows cflib:
half-way then stays in bootloader mode instead of jumping into a partly
overwritten firmware.
softdevice. The nRF51 firmware from the same flash is then written at the new
start page.
nrf51-bootloader+softdeviceis added to the list of flash targets.Confirming a bootloader from a file
A bundle from a release or zip is a released bootloader, but one given with
--bincan be anything. If it does not start, the Crazyflie can no longer beflashed over the radio and can only be recovered with an SWD debug probe. So
bootload flashandswarm bootload flashwarn and ask before flashing one(default no; once for the whole swarm).
--accept-bootloader-riskflashes itwithout asking and is required when running non-interactively (exit code 30
without it). Releases and zips are flashed without asking.
Depends on bitcraze/cfloader-rs#2
This uses the bootloader version,
reset_to_bootloader()andrefresh_info()from that PR.
Cargo.tomlpoints at its branch for now and should go back to acrates.io release once one is published.
Testing
cargo test: unit tests cover the bundle decision for a--binbundle, acurrent release and a newer release, and when the confirmation is needed.
main:a Crazyflie 2.1 downgraded to S110 (2023.11) was upgraded to 2026.08 over a
cold boot (see Report the bootloader version and restart into a new bootloader cfloader-rs#2).
--binbundle path put a development nRF51bootloader on eight Crazyflie 2.1 Brushless, with the bootloader's flash CRC
checked against the file afterwards.
--accept-bootloader-riskwas run; theinteractive prompt has not been exercised on hardware.