Page 1 of 1

Is there a simple way to just re-install all firmware on crazyflie?

Posted: Wed Sep 08, 2021 7:19 pm
by edsut
Hi,
I am very new to this environment, so apologies in advance...
I have a CrazyFlie that has PX4 loaded on it, now I need to get it back
to running the CrazyFlie flight controller...
I am using a Linux (Ubuntu 18.04LTS) machine for development and just want
to restore the firmware.
Any pointers?
Ed

Re: Is there a simple way to just re-install all firmware on crazyflie?

Posted: Wed Sep 08, 2021 7:40 pm
by edsut
Ok, I may have at least partially answered my own question here...
I found this: https://www.bitcraze.io/documentation/r ... pment/dfu/
and was able to install cf2loader-1.0.bin, which I assume is the bootloader..
https://github.com/bitcraze/crazyflie2- ... er-1.0.bin
I can use the dfu to install the firmware cflie.bin, but I can't find it. Do I have to build from scratch or is
there a release directory similar to the bootloader?

BTW... If I'm totally off base here, please inform!

Re: Is there a simple way to just re-install all firmware on crazyflie?

Posted: Thu Sep 09, 2021 8:06 am
by tobias
You are on the right track. The binary and dfu release you can find in the crazyflie-firmware repo.

If you have a Crazyradio and flashed the bootloader you should also be able to use the cfclient to do a recovery.

Re: Is there a simple way to just re-install all firmware on crazyflie?

Posted: Thu Sep 09, 2021 8:14 am
by arnaud
Hi,

You should only need the bootloader and then you can flash everything over the radio. Dfu flashing is considered a recovery mode for the Crazyflie (exactly your use-case here :-), so it is used to get the radio bootloader back in place and then use the radio bootloader. There is ways to flash the firmware over DFU but you will need to compile the firmware yourself (I think there is a make target in the firmware to flash over dfu actually).

The best, now that you have the bootloader back in place, would be to flash the latest release using Crazyradio and the Crazyflie client. The procedure is documented there: https://www.bitcraze.io/documentation/r ... very-mode/.

Note that both M2 and M3 should blink in bootlaoder mode: M2 is driven by the nRF51 radio MCU and M3 by the STM32 you just flashed the firmware over DFU. So if everything is correct, both LED will blink and the bootloader will allow you to get the latest released firmware.

Edit: Race condition with Tobias, he posted while I was writing :). Apparently we do release dfu files, I would still not advice to use them unless you have a good reason to do so.

Re: Is there a simple way to just re-install all firmware on crazyflie?

Posted: Thu Sep 09, 2021 11:56 am
by edsut
@tobias/arnaud,
Thanks for the info!
I was able to restore both bootloader and crazyflie with DFU.
I did have to build crazyflie from scratch, but that's ok.
Then, just to be sure I was flying with valid firmware (as you suggested),
I used cfclient to reload the latest image taken from the dropdown list
under Connect->Bootloader.
Thanks for the help!
Ed