User Tools

Site Tools


projects:crazyflie2:development:ota

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
projects:crazyflie2:development:ota [2015-01-27 15:37]
fred
projects:crazyflie2:development:ota [2015-07-22 16:33]
tobias
Line 1: Line 1:
 +====== OTA (Over The Air) update of the STM32 using the Crazyradio/Crazyradio PA ======
 +The Crazyflie and Crazyflie 2.0 has the possibility to be updated/flashed over the air using the Crazyradio or Crazyradio PA. This will cover how to do it using the make util.
 +
 +== Prerequisite ==
 +   * A Crazyflie or Crazyflie 2.0
 +   * A Crazyradio or Crazyradio PA
 +   * The [[projects:crazyflie:pc_utils:install|PC client]] installed and working
 +   * The [[https://github.com/bitcraze/crazyflie-firmware|Crazyflie]] or [[https://github.com/bitcraze/crazyflie-firmware/tree/crazyflie2|Crazyflie 2.0]] source code
 +(This has been tested on ubuntu but should work on mac and windows with the necessary tools installed)
 +== Instructions ==
 +For it to work out of the box the crazyflie-clients-python and the crazyflie-firmware needs to be located in the same directory. If it isn't the cfloader path can be altered in the Crazyflie Makefile
 +<code>
 +CLOAD_SCRIPT      ?= ../crazyflie-clients-python/bin/cfloader
 +</code>
 +
 +Then go into the crazyflie-firmware directory and compile the firmware. The firmware should be compiled with CLOAD=1 (default). If it is the compilation output will say "CrazyLoader build!" in the end.
 +<code>
 +cf@bitcraze:~/projects/crazyflie-firmware$ make -j4
 +...
 +  LD    cflie.elf
 +  COPY  cflie.hex
 +  COPY  cflie.bin
 +   text    data     bss     dec     hex filename
 +  73992    1112   26892 101996   18e6c cflie.elf
 +Build g05f2a3b3a726:05f2a3b3a726 (2014.01.0-15) MODIFIED
 +CrazyLoader build!
 +rm version.c
 +</code>
 +When the code has been compiled without any errors it is time to put the crazyflie on bootloader mode.
 +|| Crazyflie | Crazyflie 2.0 ||
 +|| Power it on after lanching the script | When turning it on hold the button until the blue led starts to blink ||
 +
 +To lanch the firmware update run "make cload"
 +<code>
 +cf@bitcraze:~/projects/crazyflie-firmware$ make cload
 +
 +../crazyflie-clients-python/bin/cfloader flash cflie.bin stm32-fw
 +Restart the Crazyflie you want to bootload in the next  10 seconds ...  done!
 +Connected to bootloader on Crazyflie 2.0 (version=0x10)
 +Target info: nrf51 (0xFE)
 +Flash pages: 232 | Page size: 1024 | Buffer pages: 1 | Start page: 88
 +144 KBytes of flash avaliable for firmware image.
 +Target info: stm32 (0xFF)
 +Flash pages: 1024 | Page size: 1024 | Buffer pages: 10 | Start page: 16
 +1008 KBytes of flash avaliable for firmware image.
 +
 +Flashing to stm32 (fw): 75119 bytes (74 pages) ..........10..........10..........10..........10..........10..........10..........10....4
 +Reset in firmware mode ...
 +</code>
 +
 +The STM32 firmware has now been flashed!
 +