User Tools

Site Tools


doc:crazyflie:dev:starting

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
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://www.bitcraze.io/documentation/system/]]
 +</WRAP>
 +
 +
 ====== 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 "Update all projects" script. For Crazyflie 2.0 switch to the branch crazyflie2 and for Crazyflie 1 switch to the branch master.+Clone the crazyflie-firmware project, or update it using the virtual machine "Update all projects" script. For Crazyflie 2.0 or Crazyflie Nano (1.0) make sure the current branch is "**master**."
  
 <code> <code>
 ~$ cd projects/crazyflie-firmware/ ~$ cd projects/crazyflie-firmware/
-# Either: +crazyflie-firmware$ git checkout master     # For Crazyflie Nano (1.0) or Crazyflie 2.0
-crazyflie-firmware$ git checkout master     # For crazyflie 1 +
-or +
-crazyflie-firmware$ git checkout crazyflie2 # For Crazyflie 2.0+
 </code> </code>
  
-Then make+Then make the firmware.
  
-<code>+For **Crazyflie 2.0**:<code>
 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!+Build 54:b4b7a369d1f4 (2015.08.1-54) CLEAN 
 +Version extracted from git 
 +Crazyloader build! 
 +   text    data     bss     dec     hex filename 
 +  85844    1248   29856 116948   1c8d4 cf2.elf 
 +rm version.c 
 +crazyflie-firmware$ 
 +</code> 
 + 
 +Or, for **Crazyflie Nano** (1.0):<code> 
 +crazyflie-firmware$ make PLATFORM=CF1 
 +(...) 
 +  DFUse cf1.dfu 
 +Crazyflie Nano (1.0) build! 
 +Build 54:b4b7a369d1f4 (2015.08.1-54) CLEAN 
 +Version extracted from git 
 +Crazyloader build!
    text    data     bss     dec     hex filename    text    data     bss     dec     hex filename
-  74496    1112   26896 102504   19068 cflie.elf+  66068     356   19796   86220   150cc cf1.elf 
 +rm version.c
 crazyflie-firmware$ crazyflie-firmware$
 </code> </code>
Line 47: Line 66:
 To program using the radio bootloader: To program using the radio bootloader:
  
 +For **Crazyflie 2.0**:
 <code> <code>
 crazyflie-firmware$ make cload crazyflie-firmware$ make cload
 </code> </code>
  
 +Or, for **Crazyflie Nano** (1.0):
 +<code>
 +crazyflie-firmware$ make cload PLATFORM=CF1
 +</code>
 ==== NRF51 ==== ==== NRF51 ====
 ==== Note on programming cables ==== ==== Note on programming cables ====
Line 66: Line 90:
 OPENOCD_TARGET    ?= target/stm32f4x_stlink.cfg OPENOCD_TARGET    ?= target/stm32f4x_stlink.cfg
 </code> </code>
 +
 +==J-LINK==
 +
 +The SEGGER J-LINK can be used for debugging and flashing.
 +
 +  * Download and install a recent version of [[http://openocd.org/|OpenOCD]], you will need at least version 0.9.
 +  * (Optional) Download and install (or extract) the [[https://www.segger.com/jlink-software.html|J-Link Software]]. The following was tested with version 5.10u.
 +  * In order to flash the NRF51, add the following to your crazyflie2-nrf-firmware/config.mk
 +<code>
 +OPENOCD_INTERFACE ?= interface/jlink.cfg
 +OPENOCD_TARGET    ?= target/nrf51.cfg
 +OPENOCD_CMDS      ?= -c "set WORKAREASIZE 0" -c "transport select swd"
 +</code>
 +   * In order to flash the STM32, add the following to your crazyflie-firmware/tools/make/config.mk
 +<code>
 +OPENOCD_INTERFACE ?= interface/jlink.cfg
 +OPENOCD_TARGET    ?= target/stm32f4x.cfg
 +OPENOCD_CMDS      ?= -c "transport select swd"
 +</code>
 +
 +   * 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.
 +<code>
 +./JLinkExe -device STM32F405RG -if swd -speed 4000
 +</code>
 +
 +   
  
 === 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://github.com/bitcraze/crazyflie-lib-python|crazyflie-lib-python]]:
 +<code>
 +python3 write-eeprom.py
 +</code>
 +    
 +
 +This will find your first Crazyflie (which is the one you connected over USB) and write the default values to the EEPROM.
  
  
doc/crazyflie/dev/starting.1436970670.txt.gz · Last modified: 2015-12-27 05:41 (external edit)