User Tools

Site Tools


projects:crazyflie:devenv:index

This is an old revision of the document!


Development environment

Software Tools

Software used

The following software is in the Crazyflie development environment toolchain:

These are available for both Windows and Linux.

Setup on Fedora 16

Installing

Fix permissions

In order to fix the permissions so it's possible to use the JTAG and USB Radio without being root do the following steps.

sudo usermod -a -G plugdev username

Note that you will need to logout and in again for the added group to take effect.

Find the JTAG vendor/product ID by running lsusb.

Create a file named /etc/udev/rules.d/99-jtagkey.rules and add the following:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", MODE="0664", GROUP="plugdev"

Create a file named /etc/udev/rules.d/99-crazyradio.rules and add the following:

SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", ATTRS{idProduct}=="7777", MODE="0664", GROUP="plugdev"

Setup on Ubuntu 10.04 LTS / 11.10

Setup on Windows

Compiling the copter code

The Crazyflie project is based on a Makefile. A couple of target are useful:

crazyflie$ make         # Make copter firmware
crazyflie$ make V=1     # Make copter firmware and shows the full compilation commands
crazyflie$ make CLOAD=1 # make copter firmware to be used with the bootloader
crazyflie$ make flash   # Flash firmware using openOCD and the jtagKey
crazyflie$ make reset   # Reset the copter using openOCD
crazyflie$ make openocd # Launch openOCD and connect it to the copter (can then be used via the telnet interface and/or GDB)

A couple of variables can be set on the command line or shell environment to configure the build process:

Variable Default value Usage
CLOAD 0 If at 1 the firmware is liked to be used with the bootloader.
DEBUG 1 If at 1 the firmware will be build without optimization and with debug symbol (the firmware is ~70K in debug mode and ~40K optimized).
CROSS_COMPILE arm-none-eabi- Prefix of the cross compilation toolchain to use. Any bare arm GCC should do. The default value is good for the CodeSourcery toolchain.
OPENOCD_INTERFACE interface/jtagkey.cfg JTAG interface configuration file to use with openOCD. Default is for the Amontec JtagKEY.
V 0 Verbose mode. If V=1 the compilers command lines will be displayed. If V=0 only the tool type and target file are displayed.

It must be noted that the openOCD targets do not make the copter code, hence the compilation must be called first with make and then make flash can be called.

It is possible to flash with openOCD/jtag a bootloader version of the copter as long as the bootloader is present at the beginning of the flash. However this could interfere with GDB.

It is also possible to work with the copter code from within Eclipse.

Compiling and flashing the bootloader

The copter can be loaded with a radio bootloader contained in the crazyloader folder. The dev environment is very similar to the copter one:

crazyloader$ make       # Make the bootoader
crazyloader$ make flash # Flash the bootloader with openOCD
projects/crazyflie/devenv/index.1331636334.txt.gz · Last modified: 2015-07-15 16:30 (external edit)