Building in windows
Setup Cygwin
download the Setup*.exe from https://www.cygwin.com/
Execute the download Setup and step through the installation wizard (no need to customize the settings here). Stop at the “Select Packages” Screen and select the following Packages for Installation:
- Devel/git
- Devel/bash-completion (was git-completion, Optional)
- Devel/make
- Devel/binutils
- Editors/vim
- Editors/vim-common (Optional)
- Shells/mintty (should be already selected)
Continue with the Installation and accept all autodetected dependencies.
Setup GNU ARM Toolchain
versions do matter, 4.8-2014-q2 is known to work well. Download this version from https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q2-update/+download/gcc-arm-none-eabi-5_4-2016q2-20160622-win32.zip
Extract the contents of this archive to any folder of your choice, for instance C:\dev\gcc-arm
.
add the “bin” subdirectory to the PATH Windows environment variable: %PATH%;C:\dev\gcc-arm\bin
Checkout and compile Cleanflight
Head over to the Cleanflight Github page and grab the URL of the GIT Repository: “https://github.com/cleanflight/cleanflight.git”
Open the Cygwin-Terminal, navigate to your development folder and use the git commandline to checkout the repository:
To compile your Cleanflight binaries, enter the cleanflight directory and build the project using the make command. You can append TARGET=[HARDWARE] if you want to build anything other than the default NAZE target:
within few moments you should have your binary ready:
You can use the Cleanflight-Configurator to flash the obj/cleanflight_NAZE.hex
file.
Updating and rebuilding
Navigate to the local cleanflight repository and use the following steps to pull the latest changes and rebuild your version of cleanflight:
You may want to remove -j16 -l if your having a hard time narrowing down errors. It does multithreaded make, however it makes it harder to know which warning or error comes from which file.