Development Environment Setup on Windows

This section describes how to configure your development environment and to build Zephyr applications in a Microsoft Windows environment.

This guide was tested by compiling and running the Zephyr’s sample applications on the following Windows version:

  • Windows 8.1

Update Your Operating System

Before proceeding with the build, ensure that you are running your Windows system with the latest updates installed.

Installing Requirements and Dependencies

To install the software components required to build Zephyr applications on Windows, you will need to build or install a toolchain.

Install GIT. Go to GIT Download to obtain the latest copy of the software.

Install Python 2.7. Go to Python Download to obtain the 2.7 version of the software.

Install MinGW. MinGW is the minimalist GNU development environment for native Windows applications. The Zephyr build system will execute on top of this tool set.

To install MinGW, visit the site MinGW Home and install the following packages with their installler mingw-get-setup.exe:

  • mingw-developer-toolkit
  • mingw32-base
  • msys-base
  • msys-binutils
  • msys-console
  • msys-w32api

Launch the MSYS console. The installer does not create shortcuts for you, but the script to launch it is in C:\MinGW\msys\1.0\msys.bat.. We need the following line in /etc/fstab:

#Win32_Path     Mount_Point
c:/mingw             /mingw

The easiest way to do this is just copy the file fstab.sample as fstab and confirm that the these lines are in the new fstab file.

$ cp /etc/fstab.sample /etc/fstab
$ cat /etc/fstab

Configure Python’s folder location in the environmental variable PATH and the installation path for MinGW.

Note

The format of the path for PYTHON_PATH must to be in the linux format. Default installation is in C:\python27, which would be written as /c/python27/.

export PYTHON_PATH=/c/python27
export PATH=$PATH:${PYTHON_PATH}
export MINGW_DIR=/c/MinGW

GNU Regex C library

The Zephyr build process has a dependency with the GNU regex library. Msys provides its own GNU library implementation that can be downloaded from the MinGW and Msys official repository:MinGW Repository. Install the library from the Msys console interface with the following commands:

mingw-get update
mingw-get install msys-libregex-dev --all-related

Toolchain Installation

The build system should be able to work with any toolchain installed in your system.

For instance, the Zephyr build system was tested with the toolchain provided with the ISSM 2016 (Intel System Studio for Microcontrollers) installation.

To install ISSM use the link provided to download from the Intel Developer Zone: ISSM 2016 Download and install it into your system.

Finally, configure your environment variables for the ISSM 2016 toolchain. For example, using the default installation path for ISSM: C:/IntelSWTools/ISSM_2016

export ZEPHYR_GCC_VARIANT=issm
export ISSM_INSTALLATION_PATH=C:/IntelSWTools/ISSM_2016

Note

The format of the location for the ISSM installation directory (e.g. ISSM_INSTALLATION_PATH) must be in the windows format.