Products
-
-
- Accessories
- Breakout boards
This page has deprecated. Go to the readme of the github repository project: https://github.com/bitcraze/bitcraze-vm
If you don't want to download our VM you can create your own by following the instructions on this page.
There's a few things you need to download before you get started:
The rest of the instructions on this page will assume that you use VirtualBox and Xubuntu 14.10.
After downloading VirtualBox, install it, install the VirtualBox extension pack and start VirtualBox:
First of all make sure that the system is up to date by running:
sudo apt-get update sudo apt-get dist-upgrade sudo reboot
There's a few issues with the software that comes with the default Ubuntu distro so the following PPAs have to be added.
sudo sh -c 'echo deb http://luke.campagnola.me/debian dev/ > /etc/apt/sources.list.d/pyqtgraph.list'
After adding the extra PPAs you need to update the available packages:
sudo apt-get update
Most of the software that you will need is now available from the repositories so just run the following command to install it:
sudo apt-get -y install git kicad sdcc python2.7 python-usb python-qt4 qt4-designer kicad build-essential python-pip libsdl2-dev python-pyqtgraph openocd
Install a Java JDK
sudo apt-get -y install openjdk-7-jdk
Now install the Python SDL2 bindings using PIP
sudo pip install pysdl2
There's also some “nice to have” software that is installed in the VM we distribute:
sudo apt-get -y install gitg meld leafpad
The gcc-arm-none-eabi toolchain needed for the Crazyflie firmware is not available for Xubuntu 13.04 from a PPA yet so it needs to be downloaded separately.
Download it, unpack it, create a directory for it and copy it:
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2014-q4-major/+download/gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2 tar xjf gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2 mkdir ~/bin mv gcc-arm-none-eabi-4_9-2014q4 ~/bin/gcc-arm-none-eabi
In order for the build system to find the toolchain when building the firmware it has to be added to the path:
echo -e "\nPATH=\$PATH:$HOME/bin/gcc-arm-none-eabi/bin" >> ~/.bashrc source ~/.bashrc
In order to avoid being root when using the Crazyradio the following should be run to add udev rules for the Crazyradio and for the NRF bootloader used to update the Crazyradio firmware:
sudo usermod -a -G plugdev $USER sudo sh -c 'echo SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"1915\", ATTRS{idProduct}==\"7777\", MODE=\"0664\", GROUP=\"plugdev\" > /etc/udev/rules.d/99-crazyradio.rules' sudo sh -c 'echo SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"1915\", ATTRS{idProduct}==\"0101\", MODE=\"0664\", GROUP=\"plugdev\" >> /etc/udev/rules.d/99-crazyradio.rules' sudo sh -c 'echo SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"5740\", MODE=\"0664\", GROUP=\"plugdev\" >> /etc/udev/rules.d/99-crazyflie.rules'
The following will create a project directory and clone all the Crazyflie/Crazyradio projects:
mkdir ~/projects cd ~/projects git clone git://github.com/bitcraze/crazyflie-clients-python.git git clone git://github.com/bitcraze/crazyflie-firmware.git git clone git://github.com/bitcraze/crazyflie-bootloader.git git clone git://github.com/bitcraze/crazyradio-firmware.git git clone git://github.com/bitcraze/crazyflie-android-client.git git clone git://github.com/bitcraze/crazyflie2-exp-template-electronics.git git clone git://github.com/bitcraze/crazyflie2-stm-bootloader.git git clone git://github.com/bitcraze/crazyflie2-nrf-bootloader.git git clone git://github.com/bitcraze/crazyflie2-nrf-firmware.git
Download PyCharm, install it into the /opt/ and add it to the search path.
sudo tar -xf pycharm-community-4.0.2.tar.gz -C /opt/ echo -e "\nPATH=\$PATH:/opt/pycharm-community-4.0.2/bin" >> ~/.bashrc source ~/.bashrc
If you would like to build and debug the Crazyflie firmware using Eclipse follow the instructions below. Note that in order to do this you will need some device that can debug with JTAG. There's lots of devices that do this but we use the BusBlaster v4.
tar -xf <eclipse_file> -C ~/bin/
Now install the CDT GDB addon by:
Additional environment setup:
Here's a script that will pull all the latest changes from the repos that is cloned. This will not work if you're developing, but if you are just running the software and want to update to the latest version it's ok.
#!/bin/bash # # Simple script to update all the repos to the latest version. for f in /home/bitcraze/projects/* do if [ -d "$f" ]; then echo "Updating $f" cd $f git pull cd .. fi done read -p "Press any key to exit" -n1 -s
You can also create a shortcut on the desktop by right-clicking on it, selecting Create launcher… and setting the following:
When you click it the first time, select “Mark as executable”.
Before the VM is exported as OVA the following should be done to make the image as small as possible:
sudo apt-get autoremove sudo apt-get autoclean sudo apt-get clean
VBoxManage storageattach "<VM Name>" --storagectl "SATA" --port <VDI port> --discard on
sudo fstrim -v /
Now the VM can be exported as OVA by going to the menu File→Export applicance…, selecting the VM and filling in the appropriate information. update_on_vm_release