This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
projects:crazyflie:devenv:index [2012-11-15 21:07] arnaud [Setup on Ubuntu 10.04 LTS / 11.10] |
projects:crazyflie:devenv:index [2014-12-16 00:11] chad Added a Setup on Mac OS X section with a link to a post about the Mac OS X dev environment. |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Development environment ====== | ||
- | ===== Software Tools ===== | ||
- | ==== Software used ==== | ||
- | The following software is in the Crazyflie development environment toolchain: | ||
- | * [[http:// | ||
- | * [[http:// | ||
- | These are available for both Windows and Linux. | ||
- | |||
- | ==== Setup on Fedora 16 ==== | ||
- | === Installing === | ||
- | 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/ | ||
- | |||
- | Create a file named / | ||
- | < | ||
- | SUBSYSTEM==" | ||
- | </ | ||
- | |||
- | Create a file named / | ||
- | < | ||
- | SUBSYSTEM==" | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ==== Setup on Ubuntu 10.04 LTS / 11.10 ==== | ||
- | |||
- | TBD | ||
- | ==== Setup on Windows ==== | ||
- | |||
- | ===== Compiling the copter code ===== | ||
- | |||
- | The Crazyflie project is based on a Makefile. A couple of target are useful: | ||
- | <code bash> | ||
- | 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 cload # Flash the firmware using the radio 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 | | ||
- | | OPENOCD_INTERFACE | | ||
- | | 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. | | ||
- | | PYTHON2 | python | ||
- | |||
- | It is possible to create a file // | ||
- | |||
- | The openOCD targets do not make the copter code, hence the compilation must be called first with '' | ||
- | |||
- | It is possible to flash with openOCD/ | ||
- | |||
- | 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: | ||
- | <code bash> | ||
- | crazyloader$ make # Make the bootoader | ||
- | crazyloader$ make flash # Flash the bootloader with openOCD | ||
- | </ |