Development Alternative Windows Environment
Clone this wiki locally
The current and supported TauLabs development environment for Windows is found on the Windows page. If you deviate from those instructions the development environment probably won't work and you are on your own.
This page is a collection of notes on the development environment for Windows that tries to explain how the components interact so that "unsupported" development environments can be built. It is intended to help people that are trying to configure their system to build Taulabs when they have conflicts with how the supported environment works.
The supported environment requires specific versions of tools installed to specific locations, i.e. the /tools directory. Some attempt has been made to allow tools to be accessible via the system path, however the system is quite sensitive and it is very easy to cause problems resulting in a broken development environment.
The Taulabs source code uses a Makefile to build firmware, GCS, Android GCS, and various other tools. The Makefile is written in such a way that it expects to be run from a Bash style shell.
Under Linux, gcc, g++ and make are usually provided as part of a compiler toolkit available to whichever distribution is in use. Under Mac OSX, gcc, g++ and make are provided as part of Xcode.
Under Windows, MinGW is one of the few gcc/g++ toolkist that are available. A version of MinGW's compiler toolkit is shipped with the "MinGW" Qt SDK. The supported method of building Taulabs uses a MinGW compiler toolkit provided by an old and unavailable Qt SDK, and piggy backs off the Msys Bash shell that ships as a part of msysGit, the binary release of Git for Windows.
To build all of the Taulabs components under Windows you need to provide a Bash like shell and a C/C++ compiler toolkit that is binary compatible with the Qt 4.8 Library you are trying to use. Note, the C/C++ compiler toolkit that currently ships with MinGW's "current" version is not compatible with the binary distributions of the Qt 4.8 Library.
- MinGW C/C++ compileer toolchain that is binary compatible with the Qt Library
- Qt Library 4.8.x
- Bash shell
- Python 2.7
Other Useful Tools
MinGW is the C and C++ compiler used to build the GCS and the UAV Object Generator. MinGW's port of GNU make (mingw32-make.exe) is used on Windows to process the main Makefile which includes building firmware for the various flight controller boards.
The current Taulabs is written using the Qt 4.8 SDK. Note that the Qt 4.8 Library packages distributed by Qt are built against GCC 4.4 and require a MinGW compiler toolchain that is binary compatible with GCC 4.4. It is not possible to use the MinGW compilers that are packaged as part of the Qt 5 SDK distribution as they are built with newer GCC (4.7+) compilers.
To build Taulabs against Qt 4.8 you have essentially two options: 1. Install a binary distribution of Qt 4.8 and use a MinGW compiler toolchain that is binary compatible with GCC 4.4 2. Compile Qt 4.8 from source with your preferred version of the MinGW compiler toolchain
There is a Qt 4.8 compatible MinGW binary package provided by Qt however at the time of writing it appears the latest successful build is several months old. Regardless, this is the recommended C/C++ compiler as part of this guide.
The Qt 4.8.5 Library is the most recent release in the 4.8 series. The default installation location for Qt 4.8.5 Library is %SYSTEMDRIVEE%\Qt\4.8.5, which is more often than not C:\Qt\4.8.5.
The default installation of the Qt Library does not add the %SYSTEMDRIVE%\Qt\4.8.5\bin directory to the system path. You must add this directory to your system path. There is some work being undertaken to remove this requirement but we aren't quite there yet.
The Makefile currently includes several commands that are specific to a bash-like shell. The majority of these include testing for the existence of a directory and then taking action upon the result.
The supported Windows build environment uses the bash shell that is packaged as part of msysGit. As git is a required tool to generate commit hashes to "sign" UAV objects and as msysGit is a common way of getting git onto a Windows system, presumably this shell was seen as a convient and "easy" way to get a Windows bash environment available to Taulabs.
The result is that Taulabs effectively has a dependence on a Msys environment (which provides a Bash shell). Msys has now been included as part of the larger MinGW installer and is now installed by mingw-get, a command line installer utility. It is recommended to install MinGW including Msys to get a standalone bash shell that is separate to the shell that is a part of msysGit.
The default installation for MinGW is to %SYSTEMDRIVE%\MinGW, which is more often than not C:\MinGW. A .bat file that will start a bash shell is then available at %SYSTEMDRIVE%:\MinGW\msys\1.0\msys.bat, which is also added to the Windows Programs menu during the MinGW install process.
Need to review previous two paragraphs. There is a Msys environment provided by the Qt MinGW distribution that may be more suitable. Using MinGW "natively" may cause some DLL hell :(
Other Notes not yet sorted
QTMINGW environment variable is set in sh.cmd, and is used in the copydata .pro file to copy MinGW dlls into a release distribution