===== Setting Up the Deviation Build Environment ===== **NOTE: It is now strongly recommended that you use Docker images to build Deviation. Instructions for building can be found [[development:docker | here]]** ==== Building for ARM (on Linux) ==== - download and install the pre-compiled Linux compiler from here: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads * Note that the only supported compiler for Deviation is gcc-arm-none-eabi-8-2018-q4. You can find the link to this from here: https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 - Add the path to the 'bin' directory to your PATH ==== Building for ARM (on Windows) ==== - Download and install the precompiled windows compiler from here: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads * Note that the only supported compiler for Deviation is gcc-arm-none-eabi-8-2018-q4. You can find the link to this from here: https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-win32.zip - Add path to 'bin' directory to your PATH (I like to put this into ~/.profile so it is there each time I start msys): ''export PATH=/mingw/stm32/bin:$PATH'' - Ensure python is installed. If not install it from here: http://www.python.org/download/releases/2.7.3/ - Add python to your msys path: ''export PATH="/c/":$PATH'' * For example: ''export PATH="/c/Program Files/Python27":$PATH)'' ==== Building the Windows binary on Linux ==== First install fltk: apt-get install mingw32 mingw32-binutils mingw32-runtime ./configure --disable-largefile --enable-localjpeg \ --enable-localzlib --enable-localpng \ --disable-gl --host=i586-mingw32msvc \ --prefix=/opt/fltk-w32 make sudo make install Next install portaudio: ./configure --prefix=/opt/portaudio-w32 make sudo make install ==== Building the Windows binary on Windows ==== First install MingW: * Download the mingw installer as per: http://www.mingw.org/wiki/Getting_Started * Run the installer, and select 'C++', 'MSYS' and the 'Developer Toolkit' Next, install fltk: * Download fltk from here: http://fltk.org/software.php?VERSION=1.3.0&FILE=fltk/1.3.0/fltk-1.3.0-source.tar.gz * Start msys (you should have an icon, but otherwise run C:\MingW\msys\1.0\msys.bat * mkdir src * cd src * Untar fltk: tar -xzf (you can get to your C: drive in mingw using /c/Users//Downloads for example) * cd fltk-1.3.0 * ./configure * make * make install Then, install portaudio: * Download portaudio from here: http://www.portaudio.com/archives/pa_stable_v19_20111121.tgz * Start msys (you should have an icon, but otherwise run C:\MingW\msys\1.0\msys.bat * cd src * Untar portaudio: tar -xzf (you can get to your C: drive in mingw using /c/Users//Downloads for example) * cd portaudio * ./configure * make * make install Finally, install Deviation: * Download the source code for deviation. You'll need mercurial to keep track of changes (which will require installing python), but you can manually download a zip of the source from bitbucket.org/PhracturedBlue/deviation * cd ~/src * cp -pf deviation * cd deviation/src ==== Building Deviation ==== * The default build target is the devo8 transmitter. If you type ''make'' in the deviation/src directory this is what you will get. * Other transmitters can be specified on the make cmdline: ''make devo10 devo7e'' * Creating packaged zip files can be done by pre-pending 'zip_': ''make zip_devo10'' * Building the emulator is done by pre-pending 'emu_': ''make emu_devo8'' or ''make zip_emu_devo8'' * Building the windows version of the emulator can be done vie: ''make win_emu_devo8'' or ''make zip_win_emu_devo8''