]> granicus.if.org Git - esp-idf/blob - docs/get-started/windows-setup.rst
windows: Update precompiled env link & toolchain in setup script
[esp-idf] / docs / get-started / windows-setup.rst
1 ***************************************
2 Standard Setup of Toolchain for Windows
3 ***************************************
4
5 Introduction
6 ============
7
8 Windows doesn't have a built-in "make" environment, so as well as installing the toolchain you will need a GNU-compatible environment. We use the MSYS2_ environment to provide this. You don't need to use this environment all the time (you can use :doc:`Eclipse <eclipse-setup>` or some other front-end), but it runs behind the scenes.
9
10
11 Toolchain Setup 
12 ===============
13
14 The quick setup is to download the Windows all-in-one toolchain & MSYS2 zip file from dl.espressif.com:
15
16 https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20171123.zip
17
18 Unzip the zip file to ``C:\`` (or some other location, but this guide assumes ``C:\``) and it will create an ``msys32`` directory with a pre-prepared environment.
19
20
21 Check it Out
22 ============
23
24 Open a MSYS2 MINGW32 terminal window by running ``C:\msys32\mingw32.exe``. The environment in this window is a bash shell. 
25
26 .. figure:: ../_static/msys2-terminal-window.png
27     :align: center
28     :alt: MSYS2 MINGW32 shell window
29     :figclass: align-center
30
31     MSYS2 MINGW32 shell window
32
33 Use this window in the following steps setting up development environment for ESP32.
34
35
36 Next Steps
37 ==========
38
39 To carry on with development environment setup, proceed to section :ref:`get-started-get-esp-idf`.
40
41 Updating The Environment
42 ========================
43
44 When IDF is updated, sometimes new toolchains are required or new requirements are added to the Windows MSYS2 environment. To move any data from an old version of the precompiled environment to a new one:
45
46 - Take the old MSYS2 environment (ie ``C:\msys32``) and move/rename it to a different directory (ie ``C:\msys32_old``).
47 - Download the new precompiled environment using the steps above.
48 - Unzip the new MSYS2 environment to ``C:\msys32`` (or another location).
49 - Find the old ``C:\msys32_old\home`` directory and move this into ``C:\msys32``.
50 - You can now delete the ``C:\msys32_old`` directory if you no longer need it.
51
52 You can have independent different MSYS2 environments on your system, as long as they are in different directories.
53
54 There are :ref:`also steps to update the existing environment without downloading a new one <updating-existing-windows-environment>`, although this is more complex.
55
56 Related Documents
57 =================
58
59 .. toctree::
60     :maxdepth: 1
61
62     windows-setup-scratch
63
64
65 .. _MSYS2: https://msys2.github.io/