This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
doc:crazyflie:dev:env:windows [2016-06-30 12:13] theseankelly created |
doc:crazyflie:dev:env:windows [2021-06-24 16:54] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and will be archived. Please go to [[https:// | ||
+ | </ | ||
====== Windows Development Environment ====== | ====== Windows Development Environment ====== | ||
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: | 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: | ||
* Using windows 10 -- no technical reason why this wouldn' | * Using windows 10 -- no technical reason why this wouldn' | ||
- | * Whenever presented with a choice, x86 versions of the tools were chosen. It's important to keep this consistent since and x86 emulator | + | * Whenever presented with a choice, x86 versions of the tools were chosen. It's important to keep this consistent since and x86 emulator |
- | * Cygwin was chosen for a unix environment since it's probably the most common option out there. As stated below, MinGW is probably the best option | + | * Cygwin was chosen for a unix environment since it's probably the most common option out there. As stated below, MinGW is probably the best option |
+ | ====== GNU/Linux Toolchain replacements ======= | ||
+ | A set of common utilities are required for developing, including (but not necessarily limited to): | ||
+ | * Make | ||
+ | * Git | ||
+ | * Tar (used in the crazyflie2-nrf-firmware project to unzip the nordic SDK) | ||
+ | * Unzip (used in the crazyflie2-nrf-firmware project to unzip the nordic SDK) | ||
+ | * Wget (used in the crazyflie2-nrf-firmware project to download the nordic SDK) | ||
+ | |||
+ | For these basic tools, it's recommended to get a Linux shell environment running on windows. There are a variety of options: | ||
+ | |||
+ | ===== Option #1: Cygwin ===== | ||
+ | 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:// | ||
+ | |||
+ | ===== Option #2: MinGW ===== | ||
+ | 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:// | ||
+ | |||
+ | Note: GIT isn't included in the MinGW packages. GIT for windows can be found at https:// | ||
+ | |||
+ | 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! | ||
+ | |||
+ | ===== Option #3: Ubuntu on Bash on Windows ===== | ||
+ | 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:// | ||
+ | |||
+ | ====== ARM Toolchain ====== | ||
+ | This is the toolchain required for building ARM projects (arm-none-eabi-gcc, | ||
+ | *Change the default install location to something without spaces | ||
+ | *Choose "add to path" so it can be invoked from cmd or cygwin. | ||
+ | |||
+ | ====== Java ====== | ||
+ | A Java runtime is required for various tools (eclipse, pyqt4, etc). Download and install the latest from http:// | ||
+ | |||
+ | ====== Python Environment ====== | ||
+ | This is necessary for all python based tools -- cfclient, cfloader, invoking "make cload" from the firmware project, etc) | ||
+ | =====Python Installation ===== | ||
+ | Both python 2.7 and 3.4 are used across the various crazyflie projects. Download python here: https:// | ||
+ | |||
+ | Look specifically for the latest version 2.7 and 3.4 (NOT 3.5!!). Install them to c:\python27 and c: | ||
+ | |||
+ | =====Other Python Tools===== | ||
+ | ====PYQT4 for cfclient UI==== | ||
+ | Install the latest from https:// | ||
+ | |||
+ | Get the version for python 3.4. If your goal is simply to run the cfcflient can choose ' | ||
+ | ====SDL2.0==== | ||
+ | Windows binaries for SDL2.0 are available here: https:// | ||
+ | |||
+ | Place the dll in the root of the crazyflie-clients-python folder you clone from git. | ||
+ | |||
+ | Or, for a more global/ | ||
+ | * If you are on an x86 OS using x86 bits, put the .dll in c: | ||
+ | * If you are on an amd64 OS using amd64 bits, put the .dll in c: | ||
+ | * If you are on an amd64 OS using x86 bits, put the .dll in c: | ||
+ | | ||
+ | |||
+ | ====NumPy==== | ||
+ | Download the specific version that matches your python 3.4 version and architecture from: http:// | ||
+ | For example, for python 3.4, x86: numpy-1.11.0b3+mkl-cp34-cp34m-win32.whl | ||
+ | |||
+ | =====Setup===== | ||
+ | ====Add both Python.exes to your path==== | ||
+ | If using cygwin, create symlinks to the two versions of python:< | ||
+ | ln -s / | ||
+ | ln -s / | ||
+ | |||
+ | If using MinGW, you'll need to create appropriately named shortcuts to the two python.exes and put the shortcuts in your path. | ||
+ | |||
+ | ====Configure Python 3.4==== | ||
+ | < | ||
+ | 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 / | ||
+ | |||
+ | ======Setting up USB devices (CrazyRadio or Crazyflie via USB)====== | ||
+ | - Get Zadig from: http:// | ||
+ | - Run zadig.exe | ||
+ | - Choose the device (Radio or crazyflie) | ||
+ | - Choose and install the libusb-win driver | ||
+ | |||
+ | ====== Clone the repos ====== | ||
+ | Grab the projects you're interested in from GitHub. The following is a pretty common list of repos, but not complete. Visit http:// | ||
+ | < | ||
+ | mkdir ~/projects | ||
+ | cd ~/projects | ||
+ | git clone git:// | ||
+ | git clone git:// | ||
+ | git clone git:// | ||
+ | git clone git:// | ||
+ | git clone git:// | ||
+ | git clone git:// | ||
+ | git clone git:// | ||
+ | </ | ||
+ | |||
+ | ======OpenOCD====== | ||
+ | OpenOCD is used for JTAG/SWD flashing and debugging. If you intend to use JTAG/SWD, Download OpenOCD for windows from here: http:// | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ======IDE Setup====== | ||
+ | =====Eclipse===== | ||
+ | |||
+ | Get the latest " | ||
+ | |||
+ | * Import the project you are interested in by selecting // | ||
+ | * Configure the project to use the already cloned code in the project directory by setting the following settings: | ||
+ | * Project name: <same as the directory in projects> | ||
+ | * Use default location: False | ||
+ | * Location: <path to where you cloned the repo>/< | ||
+ | * Project type: Makefile project -> Empty project | ||
+ | * Toolchains: -- Other Toolchain -- | ||
+ | |||
+ | 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===== | ||
+ | PyCharm is a great IDE for Python development. Get it here: https:// | ||
+ | =====Visual Studio===== | ||
+ | VS can certainly be used as an IDE, but hooking it up to the ARM toolchain for building might not be possible. Investigation needed. | ||