This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:crazyflie:dev:starting [2015-07-15 16:31] 127.0.0.1 external edit |
doc:crazyflie:dev:starting [2020-05-12 14:16] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
+ | </ | ||
+ | |||
+ | |||
====== Getting started developing for Crazyflie ====== | ====== Getting started developing for Crazyflie ====== | ||
Line 22: | Line 27: | ||
==== STM32 ==== | ==== STM32 ==== | ||
- | Clone the crazyflie-firmware project, or update it using the virtual machine " | + | Clone the crazyflie-firmware project, or update it using the virtual machine " |
< | < | ||
~$ cd projects/ | ~$ cd projects/ | ||
- | # Either: | + | crazyflie-firmware$ git checkout master |
- | crazyflie-firmware$ git checkout master | + | |
- | # or | + | |
- | crazyflie-firmware$ git checkout crazyflie2 # For Crazyflie 2.0 | + | |
</ | </ | ||
- | Then make | + | Then make the firmware. |
- | < | + | For **Crazyflie 2.0**:< |
crazyflie-firmware$ make | crazyflie-firmware$ make | ||
(...) | (...) | ||
- | DFUse cflie.dfu | + | DFUse cf2.dfu |
- | Build 2014.12.0:014.12.0 (2014.12.0) CLEAN | + | Crazyflie 2.0 build! |
- | CrazyLoader | + | Build 54: |
+ | Version extracted from git | ||
+ | Crazyloader build! | ||
+ | | ||
+ | 85844 | ||
+ | rm version.c | ||
+ | crazyflie-firmware$ | ||
+ | </ | ||
+ | |||
+ | Or, for **Crazyflie Nano** (1.0):< | ||
+ | crazyflie-firmware$ make PLATFORM=CF1 | ||
+ | (...) | ||
+ | DFUse cf1.dfu | ||
+ | Crazyflie Nano (1.0) build! | ||
+ | Build 54: | ||
+ | Version extracted from git | ||
+ | Crazyloader | ||
| | ||
- | | + | |
+ | rm version.c | ||
crazyflie-firmware$ | crazyflie-firmware$ | ||
</ | </ | ||
Line 47: | Line 66: | ||
To program using the radio bootloader: | To program using the radio bootloader: | ||
+ | For **Crazyflie 2.0**: | ||
< | < | ||
crazyflie-firmware$ make cload | crazyflie-firmware$ make cload | ||
</ | </ | ||
+ | Or, for **Crazyflie Nano** (1.0): | ||
+ | < | ||
+ | crazyflie-firmware$ make cload PLATFORM=CF1 | ||
+ | </ | ||
==== NRF51 ==== | ==== NRF51 ==== | ||
==== Note on programming cables ==== | ==== Note on programming cables ==== | ||
Line 66: | Line 90: | ||
OPENOCD_TARGET | OPENOCD_TARGET | ||
</ | </ | ||
+ | |||
+ | ==J-LINK== | ||
+ | |||
+ | The SEGGER J-LINK can be used for debugging and flashing. | ||
+ | |||
+ | * Download and install a recent version of [[http:// | ||
+ | * (Optional) Download and install (or extract) the [[https:// | ||
+ | * In order to flash the NRF51, add the following to your crazyflie2-nrf-firmware/ | ||
+ | < | ||
+ | OPENOCD_INTERFACE ?= interface/ | ||
+ | OPENOCD_TARGET | ||
+ | OPENOCD_CMDS | ||
+ | </ | ||
+ | * In order to flash the STM32, add the following to your crazyflie-firmware/ | ||
+ | < | ||
+ | OPENOCD_INTERFACE ?= interface/ | ||
+ | OPENOCD_TARGET | ||
+ | OPENOCD_CMDS | ||
+ | </ | ||
+ | |||
+ | * If there is an error, you can execute the following once and type connect in the command prompt. This fixes issues in case openOCD left the J-Link in an invalid state. | ||
+ | < | ||
+ | ./JLinkExe -device STM32F405RG -if swd -speed 4000 | ||
+ | </ | ||
+ | |||
+ | |||
=== Command line === | === Command line === | ||
Line 84: | Line 134: | ||
===== Contributing code back ===== | ===== Contributing code back ===== | ||
===== Finding more information ===== | ===== Finding more information ===== | ||
+ | ===== Tips and Tricks ===== | ||
+ | ==== Reset EEPROM ==== | ||
+ | The EEPROM stores configuration data, which persists even after a firmware update. You might want to reset this information. For example, if you forget the address of your Crazyflie, you won't be able to connect wirelessly anymore. In order to reset the EEPROM, follow the following steps: | ||
+ | - Unplug your Crazyradio | ||
+ | - Connect the Crazyflie to the PC using a USB-cable | ||
+ | - Execute the following from the examples of [[https:// | ||
+ | < | ||
+ | python3 write-eeprom.py | ||
+ | </ | ||
+ | | ||
+ | |||
+ | This will find your first Crazyflie (which is the one you connected over USB) and write the default values to the EEPROM. | ||