Skip to content

Commit 75d045c

Browse files
dbkindernashif
authored andcommitted
doc: Update getting started with Windows material
Update documentation on using a Windows host for doing Zephyr development using ISSM toolchain and console commands in a mingw environment Jira: ZEP-1177 Change-Id: I3e4edec26a430f424427734dfe407a185ace8434 Signed-off-by: David B. Kinder <[email protected]>
1 parent f52cbff commit 75d045c

File tree

1 file changed

+72
-85
lines changed

1 file changed

+72
-85
lines changed

doc/getting_started/installation_win.rst

Lines changed: 72 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ This section describes how to configure your development environment and
77
to build Zephyr applications in a Microsoft Windows environment.
88

99
This guide was tested by compiling and running the Zephyr's sample
10-
applications on the following Windows version:
11-
12-
* Windows 8.1
10+
applications on Windows version 8.1 (and should work with Windows 10 as well).
1311

1412
Update Your Operating System
1513
****************************
@@ -23,117 +21,106 @@ Installing Requirements and Dependencies
2321
****************************************
2422

2523
To install the software components required to build Zephyr applications on
26-
Windows, you will need to build or install a toolchain.
27-
28-
Install :program:`GIT`. Go to `GIT Download`_ to obtain the latest copy of
29-
the software.
30-
31-
Install :program:`Python 2.7`. Go to `Python Download`_ to obtain the 2.7
32-
version of the software.
33-
34-
Install :program:`MinGW`. MinGW is the minimalist GNU development environment
35-
for native Windows applications. The Zephyr build system will execute on top of
36-
this tool set.
37-
38-
To install :program:`MinGW`, visit the site `MinGW Home`_ and install the
39-
following packages with their installer `mingw-get-setup.exe`:
40-
41-
* mingw-developer-toolkit
42-
* mingw32-base
43-
* msys-base
44-
* msys-binutils
45-
* msys-console
46-
* msys-w32api
47-
48-
Launch the `MSYS console`. The installer does not create shortcuts for you,
49-
but the script to launch it is in :file:`C:\\MinGW\\msys\\1.0\\msys.bat.`.
50-
We need the following line in :file:`/etc/fstab`:
51-
52-
.. code-block:: console
53-
54-
#Win32_Path Mount_Point
55-
c:/mingw /mingw
24+
Windows, you will need to build or install a toolchain:
5625

57-
The easiest way to do this is just copy the file :file:`fstab.sample` as
58-
:file:`fstab` and confirm that the these lines are in the new
59-
:file:`fstab` file.
26+
1. Install :program:`GIT`. Go to `GIT Download`_ to obtain the latest copy of
27+
the software (2.12.0). Install into the :file:`C:\\Git` folder and use the
28+
default configuration options for the rest.
6029

61-
.. code-block:: console
30+
2. Install :program:`Python 2.7`. Go to `Python Download`_ to obtain the
31+
software (version 2.7.13) and use the default installation options.
6232

63-
$ cp /etc/fstab.sample /etc/fstab
64-
$ cat /etc/fstab
33+
3. Install :program:`MinGW`. MinGW is the minimalist GNU development environment
34+
for native Windows applications. The Zephyr build system will execute on top
35+
of this tool set. Visit the site `MinGW Home`_ and install the
36+
following packages with their installer `mingw-get-setup.exe` (you'll need
37+
to open the "All Packages" tab to enable installing the msys packages listed
38+
here):
6539

66-
Configure Python's folder location in the environmental variable :envvar:`PATH`
67-
and the installation path for MinGW.
40+
* mingw-developer-toolkit
41+
* mingw32-base
42+
* msys-base
43+
* msys-binutils
44+
* msys-console
45+
* msys-w32api
6846

69-
.. note:: The format of the path for `PYTHON_PATH` must to be in the
70-
linux format. Default installation is in :file:`C:\\python27`,
71-
which would be written as :file:`/c/python27/`.
47+
4. Launch the `MSYS console` from a cmd window. The installer does not create
48+
shortcuts for you so you'll need to run the script
49+
in :file:`C:\\MinGW\\msys\\1.0\\msys.bat.`
7250

73-
.. code-block:: console
51+
5. The Zephyr build process has a dependency on the Pthread and GNU regex
52+
libraries. Msys provides its own GNU library implementation that can be
53+
downloaded from the MinGW and Msys official repository:
54+
`MinGW Repository`_ with the following commands:
7455

75-
export PYTHON_PATH=/c/python27
76-
export PATH=$PATH:${PYTHON_PATH}
77-
export MINGW_DIR=/c/MinGW
56+
.. code-block:: console
7857
79-
Pthread library
80-
===============
58+
mingw-get update
59+
mingw-get install libpthread msys-libregex-dev --all-related
8160
82-
The Zephyr OS build process has a dependency on the Pthread library.
83-
The required packages for Msys installation would normally provide it.
84-
However, if a minimal installation fails to provide the Pthread library,
85-
it can be installed with the following command:
8661
87-
.. code-block:: console
62+
When done, move libregex files (``libregex.a``, ``libregex.dll.a``,
63+
``libregex.la``)
64+
from ``C:\Git\mingw32\msys\1.0\lib`` to ``C:\Git\mingw32\lib``
8865

89-
mingw-get install libpthread
66+
6. We need to edit :file:`/etc/fstab` to create an entry mapping from the Win32
67+
path ``c:/mingw`` to the mount point ``/mingw``
68+
The easiest way to do this is just copy the file :file:`fstab.sample` as
69+
:file:`fstab` and ``cat /etc/fstab`` to confirm that the mapping was added.
9070

91-
GNU Regex C library
92-
===================
9371

94-
The Zephyr build process has a dependency with the GNU regex library.
95-
Msys provides its own GNU library implementation that can be downloaded from the
96-
MinGW and Msys official repository: `MinGW Repository`_.
97-
Install the library from the Msys console interface with the following commands:
72+
7. The build system should be able to work with any toolchain installed in your
73+
system. For instance, the Zephyr build system was tested using the mingw
74+
MSYS console (as described below) with the toolchain
75+
provided with the ISSM 2016 (Intel System Studio for Microcontrollers)
76+
installation. Install ISSM from the Intel Developer Zone:
77+
`ISSM 2016 Download`_
9878

99-
.. code-block:: console
79+
.. note::
10080

101-
mingw-get update
102-
mingw-get install msys-libregex-dev --all-related
81+
The ISSM toolset only supports development for Intel® Quark™
82+
Microcontrollers, for example, the Arduino 101 board. (Check out the
83+
"Zephyr Development Environment
84+
Setup" in this `Getting Started on Arduino 101 with ISSM`_ document.)
85+
Also, additional setup is required to use the ISSM GUI for
86+
development.
10387

104-
Update the following environment variables on your system to allow the C compiler
105-
and linker to find the library and headers:
88+
8. From within the MSYS console, clone a copy of the Zephyr source into your
89+
home directory using Git:
10690

107-
.. code-block:: console
91+
.. code-block:: console
10892
109-
export LIBRARY_PATH=$LIBRARY_PATH:/c/mingw/msys/1.0/lib
110-
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/c/mingw/msys/1.0/include
93+
cd ~
94+
git clone https://gerrit.zephyrproject.org/r/zephyr
11195
112-
Toolchain Installation
113-
======================
96+
9. Also within the MSYS console, set up environment variables for installed
97+
tools and for the Zephyr environment (using the provided shell script):
11498

115-
The build system should be able to work with any toolchain installed in your system.
99+
.. code-block:: console
116100
117-
For instance, the Zephyr build system was tested with the toolchain provided with
118-
the ISSM 2016 (Intel System Studio for Microcontrollers) installation.
101+
export PATH=$PATH:/c/python27/
102+
export MINGW_DIR=/c/mingw
103+
export ZEPHYR_GCC_VARIANT=issm
104+
export ISSM_INSTALLATION_PATH=C:/IntelSWTools/ISSM_2016.1.067
105+
unset ZEPHYR_SDK_INSTALL_DIR
106+
source ~/zephyr/zephyr-env.sh
119107
120-
To install ISSM use the link provided to download from the Intel Developer Zone:
121-
`ISSM 2016 Download`_ and install it into your system.
108+
10. Finally, you can try building the :ref:`hello_world` sample to check things
109+
out. In this example, we'll build the hello_world sample for the Arduino
110+
101 board:
122111

123-
Finally, configure your environment variables for the ISSM 2016 toolchain.
124-
For example, using the default installation path for ISSM:
125-
:file:`C:/IntelSWTools/ISSM_2016`
112+
.. code-block:: console
126113
127-
.. code-block:: console
114+
cd $ZEPHYR_BASE/samples/hello_world
115+
make board=arduino_101
128116
129-
export ZEPHYR_GCC_VARIANT=issm
130-
export ISSM_INSTALLATION_PATH=C:/IntelSWTools/ISSM_2016
117+
This should check that all the tools and toolchain are setup correctly for
118+
your own Zephyr development.
131119

132-
.. note:: The format of the location for the ISSM installation directory
133-
(e.g. :envvar:`ISSM_INSTALLATION_PATH`) must be in the windows format.
134120

135121
.. _GIT Download: https://git-scm.com/download/win
136122
.. _Python Download: https://www.python.org/downloads/
137123
.. _MinGW Home: http://www.mingw.org/
138124
.. _MinGW Repository: http://sourceforge.net/projects/mingw/files/
139125
.. _ISSM 2016 Download: https://software.intel.com/en-us/intel-system-studio-microcontrollers
126+
.. _Getting Started on Arduino 101 with ISSM: https://software.intel.com/en-us/articles/getting-started-arduino-101genuino-101-with-intel-system-studio-for-microcontrollers

0 commit comments

Comments
 (0)