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

Firmware/software/electronics/mechanics
Post Reply
edsut
Beginner
Posts: 12
Joined: Wed Aug 25, 2021 7:19 pm
Location: New Jersey, USA
Contact:

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

Post 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
edsut
Beginner
Posts: 12
Joined: Wed Aug 25, 2021 7:19 pm
Location: New Jersey, USA
Contact:

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

Post 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!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

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

Post 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.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

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

Post 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.
edsut
Beginner
Posts: 12
Joined: Wed Aug 25, 2021 7:19 pm
Location: New Jersey, USA
Contact:

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

Post 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
Post Reply