Development Environment Setup on Windows¶
This section only describes OS-specific setup instructions; it is the first step in the complete Zephyr Getting Started Guide.
This section describes how to configure your development environment to build Zephyr applications in a Microsoft Windows environment.
This guide was tested by building the Zephyr Hello World sample application on Windows versions 7, 8.1, and 10.
Update Your Operating System¶
Before proceeding with the build, ensure that you are running your Windows system with the latest updates installed.
Install Requirements and Dependencies¶
There are 2 different ways of developing for Zephyr on Microsoft Windows:
The first option is fully Windows native; the other requires emulation layers that may result in slower build times. Both are included for completeness, but unless you have a particular requirement for a UNIX tool that is not available on Windows, we strongly recommend you use the Windows Command Prompt option for performance and minimal dependency set.
Option 1: Windows Command Prompt¶
These instructions assume you are using the
cmd.exe command prompt. Some of
the details, such as setting environment variables, may differ if you are using
The easiest way to install the native Windows dependencies is to first install Chocolatey, a package manager for Windows. If you prefer to install dependencies manually, you can also download the required programs from their respective websites.
Chocolatey will properly set up your environment so tools can be
found on your PATH. If you install programs manually, be sure to
verify the programs can also be found on your PATH. For example,
you may need to add
C:\\Program Files\Git\bin after manually
installing Git for Windows.
There are multiple
set statements in this tutorial. You can avoid
typing them every time by placing them inside a
.cmd file and
running that every time you open a command prompt.
If you’re behind a corporate firewall, you’ll likely need to specify a proxy to get access to internet resources:
set HTTP_PROXY=http://user:email@example.com:1234 set HTTPS_PROXY=http://user:firstname.lastname@example.org:1234
Install Chocolatey by following the instructions on the Chocolatey install page.
Open a command prompt (
cmd.exe) as an Administrator (press the Windows key, type “cmd.exe” in the prompt, then right-click the result and choose “Run as Administrator”).
Optionally disable global confirmation to avoid having to confirm installation of individual programs:
choco feature enable -n allowGlobalConfirmation
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
Install the rest of the tools:
choco install git python ninja dtc-msys2 gperf
Close the Administrator command prompt window.
Option 2: Windows 10 WSL (Windows Subsystem for Linux)¶
If you are running a recent version of Windows 10 you can make use of the built-in functionality to natively run Ubuntu binaries directly on a standard command-prompt. This allows you to use software such as the Zephyr SDK without setting up a virtual machine.
Windows 10 version 1803 has an issue that will cause CMake to not work properly and is fixed in version 1809 (and later). More information can be found in Zephyr Issue 10420
For the Zephyr SDK to function properly you will need Windows 10 build 15002 or greater. You can check which Windows 10 build you are running in the “About your PC” section of the System Settings. If you are running an older Windows 10 build you might need to install the Creator’s Update.
Follow the Ubuntu instructions in the Development Environment Setup on Linux document.