diff options
Diffstat (limited to 'docs/build_environment_setup.md')
-rw-r--r-- | docs/build_environment_setup.md | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/docs/build_environment_setup.md b/docs/build_environment_setup.md index 442038a58d..2282e9d131 100644 --- a/docs/build_environment_setup.md +++ b/docs/build_environment_setup.md @@ -1,19 +1,25 @@ -### Windows 10 +# Build Environment Setup -#### Creators Update +This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.) + +<!-- FIXME: We should have ARM instructions somewhere. --> + +# Windows 10 + +## Creators Update If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). -#### Windows Subsystem for Linux +## Windows Subsystem for Linux In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method. -#### Git +## Git If you already have cloned the repository on your Windows file system you can ignore this section. You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. -#### Toolchain setup +## Toolchain setup The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. 1. Open "Bash On Ubuntu On Windows" from the start menu. @@ -22,13 +28,13 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro 4. Close the Bash command window, and re-open it. 5. You are ready to compile and flash the firmware! -#### Some important things to keep in mind +## Some important things to keep in mind * You can run `util/wsl_install.sh` again to get all the newest updates. * Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. * The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations * You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. -### Windows (Vista and later) +# Windows (Vista and later) 1. If you have ever installed WinAVR, uninstall it. 2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. 3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). @@ -40,7 +46,7 @@ The Toolchain setup is done through the Windows Subsystem for Linux, and the pro If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. -### Mac +# Mac If you're using [homebrew,](http://brew.sh/) you can use the following commands: brew tap osx-cross/avr @@ -59,7 +65,7 @@ If you are going to flash Infinity based keyboards you will also need dfu-util brew install dfu-util -### Linux +# Linux To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** @@ -91,7 +97,7 @@ Debian/Ubuntu example: sudo apt-get update sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi -### Docker +# Docker If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap: @@ -109,10 +115,10 @@ docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Use This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash. -### Vagrant +# Vagrant If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md). -## Verify Your Installation +# Verify Your Installation 1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. |