Update Crazyflie Bootloader authored by Colton Glick's avatar Colton Glick
## Crazyflie Bootloader Recovery ## Crazyflie Bootloader Recovery
It is possible for the crazyflie bootloader to get overwritten or corrupted. Some symptoms that indicated this is the case include: It is possible for the crazyflie bootloader to get overwritten or corrupted. Some symptoms of this include:
- When powering on the crazyflie, only the M2 led is lit and stays solid - When powering on the crazyflie, only the M2 led is lit and stays solid
- The power button does not power off the crazyflie - The power button does not power off the crazyflie
- When putting the Crazyflie into bootloader mode by holding down the power button, only the M2 led flashes slowly - When putting the Crazyflie into bootloader mode by holding down the power button, only the M2 led flashes slowly
...@@ -8,13 +8,14 @@ It is possible for the crazyflie bootloader to get overwritten or corrupted. Som ...@@ -8,13 +8,14 @@ It is possible for the crazyflie bootloader to get overwritten or corrupted. Som
To fix this, the bootloader and firmware must be reflashed to the crazyflie. To flash the bootloader do the following: To fix this, the bootloader and firmware must be reflashed to the crazyflie. To flash the bootloader do the following:
1. Clone the [Bitcraze Crazyflie Bootloader repository](https://github.com/bitcraze/crazyflie2-stm-bootloader) 1. Clone the [Bitcraze Crazyflie Bootloader repository](https://github.com/bitcraze/crazyflie2-stm-bootloader)
2. Build the bootloader by running `make` from within `crazyflie2-stm-bootloader/`. This should generate the cf2loader.bin file. 2. Build the bootloader by running `make` from within `crazyflie2-stm-bootloader/`. This should generate the `cf2loader.bin` file.
3. Put the Crazyflie into DFU mode 3. Put the Crazyflie into DFU mode
1. Disconnect the battery 1. Disconnect the battery
2. Hold the power button down 2. Hold the power button down
3. Connect the Crazyflie to your machine via USB 3. Connect the Crazyflie to your machine via USB
4. Continue holding the power button (about 5 seconds) until the blue light reaches its second speed of flashing (about 1hz). The crazyflie's microprocessor (STM32F405) is now in DFU mode. 4. Continue holding the power button (about 5 seconds) until the blue light reaches its second speed of flashing (about 1hz). The crazyflie's microprocessor (STM32F405) is now in DFU mode.
4. Overwrite the existing bootloader by running `dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader.bin`. Notice this command downloads cf2loader.bin to address `0x08000000`, this is the start of the crazyflie memory. 4. Overwrite the existing bootloader by running `dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2loader.bin`.
- Note: this command downloads cf2loader.bin to address `0x08000000`, this is the start of the crazyflie memory and is different from where the firmware is flashed.
5. Once finished downloading the bootloader to the crazyflie, disconnect USB. 5. Once finished downloading the bootloader to the crazyflie, disconnect USB.
6. At this point, putting the Crazyflie into bootloader mode should show both M2 and M3 LEDs flashing. 6. At this point, putting the Crazyflie into bootloader mode should show both M2 and M3 LEDs flashing.
7. Flash the Crazyflie firmware as normal, see [Flashing](Crazyflie-Firmware/Flashing) 7. Flash the Crazyflie firmware as normal, see [Flashing](Crazyflie-Firmware/Flashing)
... ...
......