Update Flashing authored by Colton Glick's avatar Colton Glick
# Automatic Bootloader mode
[[_TOC_]]
# Flashing over Crazyradio
This method uses the Crazyradio to wirelessly flash the crazyflie. This method is the easiest but can be slow and unreliable when many Crazyflies and Crazyradios are running nearby.
## Automatic Bootloader mode
This method requires that the Crazyflie can boot into the normal firmware. If this is not possible, [Manual DFU Update](Crazyflie-Firmware/Flashing#manual-dfu-update) will be needed.
To automatically set a specific crazyflie into boot loader mode, add `CLOAD_CMDS = -w radio://0/<radio channel>/2M` to the `crazyflie_software/crazyflie-firmware-2021.06/tools/make/config.mk` file, if the file does not already exist create one.
1. Compile the firmware, see [How to Build](Crazyflie-Firmware/How-to-Build)
2. Run `make cload`. Your machine should connect to the crazyflie on the specified radio channel, set it to bootloader mode, and begin flashing the newly built firmware.
2. Run `make cload`. Your machine should connect to the crazyflie on the specified radio channel, put it into bootloader mode, and begin flashing the newly built firmware.
## Manual Bootloader mode
This method works by manually placing the crazyflie into bootloader mode, then the Crazyradio scans for Crazyflies that are currently in bootloader mode.
**WARNING:** This method is not recommended when multiple Crazyflies are being flashed near each other as the flasher will choose one randomly to flash.
1. Compile the firmware, see [How to Build](Crazyflie-Firmware/How-to-Build)
2. Be sure `CLOAD_CMDS = -w radio://0/<radio channel>/2M` is **NOT** in the `crazyflie_software/crazyflie-firmware-2021.06/tools/make/config.mk` file.
3. Run `make cload`
4. Place the Crazyflie into bootloader mode
1. From power off, press and hold the power button until the blue LED begins flashing, then release
2. Both blue LEDs should be flashing, if only one is flashing, see [Help! I overwrote the bootloader!](Crazyflie-Firmware/Flashing#help-i-overwrote-the-bootloader)
5. The flasher should find the Crazyflie in bootloader mode and begin flashing. Once finished the Crazyflie will restart into the new firmware
# Flashing over USB (Device Firmware Update (DFU) Mode)
This mode allows for flashing the Crazyflie firmware over USB. More specifically it will overwrite the firmware on the microcontroller (STM32F405) that runs the Crazyflie. Writing using usb provides some advantages over using the crazyradio, mainly it does not require modifying the `config.mk` file and many Crazyflies can be flashed near by with no conflicts.
......
......