Update Flashing authored by Colton Glick's avatar Colton Glick
......@@ -4,8 +4,31 @@ To automatically set a specific crazyflie into boot loader mode, add `CLOAD_CMDS
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.
# DFU Mode (Flashing Over USB)
# Device Firmware Update (DFU) Mode (Flashing Over USB)
### **WARNING, THIS METHOD CAN OVERWRITE THE BOOTLOADER, USE WITH CAUTION**
This method is meant as a last resort recovery mode for the crazyflie, however it allows for flashing over a USB connection. This gives 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
1. remove
\ No newline at end of file
1. Disconnect the battery
2. Hold the power button down
3. Plug the USB cable into your machine
4. Continue holding the power button until the blue light reaches its second level of flashing (about 5 seconds). The crazyflie's microprocessor (STM32F405) is now in DFU mode.
5. Check the USB device is in DFU mode. On linux run `lsusb`. The crazyflie should show up as `Bus xxx Device xxx: ID 0483:df11 STMicroelectronics STM Device in DFU Mode`
6. Flash the firmware.
- **Recommended** Using cf2.dfu file
- After compiling the firmware we can use the generated `cf2.dfu` file to flash by using the following command `sudo dfu-util -d 0483:df11 -a 0 -D cf2.dfu`
- Using cf2.bin file
- This method requires we specify the address to write the new firmware to.
- If the firmware was built with `CLOAD=1` (the default configuration) the firmware needs to be flashed to address `0x08004000` with the command `sudo dfu-util -d 0483:df11 -a 0 -s 0x08004000 -D cf2.bin`
- If the firmware was compiled with `CLOAD=0` (non-standard) the firmware must be flashed to the start of the flash memory at address `0x08000000` with the command `sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D cf2.bin`
- **WARNING** THIS WILL OVERWRITE THE RADIO BOOTLOADER! You can however flash the bootloader back this same way with DFU
7. Wait for the utility to finish flashing.
8. Once fully complete disconnect the USB cable.
9. Plug in the battery
10. Power on the crazyflie
### Expected output
The output from `dfu-util` should look something like this:
--------------
# References
[Deprecated DFU instructions](https://wiki.bitcraze.io/projects:crazyflie2:development:dfu?s%5B%5D=dfu)
\ No newline at end of file