- Beakout boards
This tutorial will demonstrate how to set up a windows machine to develop, build, and deploy binaries for the crazyflie natively, without use of a VM. Some notes on the setup environment used to write this guide:
A set of common utilities are required for developing, including (but not necessarily limited to):
For these basic tools, it's recommended to get a Linux shell environment running on windows. There are a variety of options:
Cygwin aspires to be a full POSIX environment for windows and is the most fully featured option, but also the most heavyweight. See installation details at http://cygwin.com. Be sure to select at least all of the packages listed above, as well as whatever else you use to develop (vim, etc).
MinGW is a much more minimalist toolchain instead of a full POSIX environment. It's essentially a set of common unix tools built as standalone win32 exes invoked from a cmd prompt. This is probably the recommended option if you don't already have Cygwin installed for other reasons, since it's much more lightweight. Details here: http://www.mingw.org/
Note: GIT isn't included in the MinGW packages. GIT for windows can be found at https://git-for-windows.github.io/
As stated earlier, this guide was written using Cygwin. There may be a couple missing steps here and there if you want to go with MinGW, but nothing major. Please update the wiki if you choose MinGW and find anything missing!
Windows 10 supports (in beta) the ability to run an Ubuntu based bash shell natively, including apt-get and things you'd expect on normal Ubuntu.
The main drawback is that hardware support (the crazyradio, for example) is not plumbed through to this shell, so you won't be able to flash, connect, or run the python tools which talk to hardware, but that's easily overcome using Conda for python scripts (see the python section below)
Details here: https://msdn.microsoft.com/en-us/commandline/wsl/about
This is the toolchain required for building ARM projects (arm-none-eabi-gcc, etc). This isn't available as part of any of the linux environments, so it's recommended to download the version built for windows from here: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm
A Java runtime is required for various tools (eclipse, pyqt4, etc). Download and install the latest from http://www.java.com/en/download/
This is necessary for all python based tools – cfclient, cfloader, invoking “make cload” from the firmware project, etc)
Both python 2.7 and 3.4 are used across the various crazyflie projects. Download python here: https://www.python.org/downloads/
Look specifically for the latest version 2.7 and 3.4 (NOT 3.5!!). Install them to c:\python27 and c:\python34.
Install the latest from https://riverbankcomputing.com/software/pyqt/download
Get the version for python 3.4. If your goal is simply to run the cfcflient can choose 'minimal' for the install, which only installs the runtime.
Windows binaries for SDL2.0 are available here: https://www.libsdl.org/download-2.0.php
Place the dll in the root of the crazyflie-clients-python folder you clone from git.
Or, for a more global/permanent solution, drop the .dll in the system folder:
Download the specific version that matches your python 3.4 version and architecture from: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy For example, for python 3.4, x86: numpy-1.11.0b3+mkl-cp34-cp34m-win32.whl
If using cygwin, create symlinks to the two versions of python:
ln -s /cygdrive/c/Python34/python.exe /usr/bin/python3 ln -s /cygdrive/c/Python27/python.exe /usr/bin/python2
If using MinGW, you'll need to create appropriately named shortcuts to the two python.exes and put the shortcuts in your path.
Python3 -m pip install --upgrade pip python3 -m pip install pyusb==1.0.0b2 pyzmq pysdl2 pyqtgraph Python3 -m pip install <path to the NumPy .whl file you downloaded earlier
Note: In Cygwin, I've had trouble installing the NumPy .whl file from the /cygdrive mount point (aka /cygdrive/c/Users/username/Downloads/numpy.whl) and it complains about the file not existing. The solution to this is to copy the .whl file to somewhere in the Cygwin file system (like the home directory) and run the install command on that file instead.
Grab the projects you're interested in from GitHub. The following is a pretty common list of repos, but not complete. Visit http://github.com/bitcraze to see all the repos.
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/crazyflie2-stm-bootloader.git git clone git://github.com/bitcraze/crazyflie2-nrf-bootloader.git git clone git://github.com/bitcraze/crazyflie2-nrf-firmware.git
OpenOCD is used for JTAG/SWD flashing and debugging. If you intend to use JTAG/SWD, Download OpenOCD for windows from here: http://www.freddiechopin.info/en/download/category/4-openocd
Add it to your system path if the installer didn't do so for you. OpenOCD commands invoked from the make scripts (make flash, etc) will work as-is. Stepwise debugging requires some setup in an IDE; details below.
Get the latest “Eclipse for C/C++ developers” from here: http://www.eclipse.org/downloads/packages/
Todo: in addition to just developing code, eclipse can be made to start up an OpenOCD server and do flashing & JTAG debugging. Instructions needed.
PyCharm is a great IDE for Python development. Get it here: https://www.jetbrains.com/pycharm/download/#section=windows (the community edition is free)
VS can certainly be used as an IDE, but hooking it up to the ARM toolchain for building might not be possible. Investigation needed.