|
|
@@ -4,34 +4,18 @@ Set up of Toolchain for Windows
|
|
|
Step 1: Quick Steps
|
|
|
===================
|
|
|
|
|
|
-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.
|
|
|
- You don't need to use this environment all the time (you can use Eclipse_ or some other front-end), but it runs behind the scenes.
|
|
|
+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 Eclipse_ or some other front-end), but it runs behind the scenes.
|
|
|
|
|
|
The quick setup is to download the Windows all-in-one toolchain & MSYS zip file from dl.espressif.com:
|
|
|
|
|
|
-https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20170111.zip
|
|
|
-
|
|
|
-Unzip the zip file to C:\ and it will create an "msys32" directory with a pre-prepared environment.
|
|
|
+https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20170321.zip
|
|
|
|
|
|
+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.
|
|
|
|
|
|
Alternative Step 1: Configure toolchain & environment from scratch
|
|
|
==================================================================
|
|
|
|
|
|
-As an alternative to getting a pre-prepared environment, you can set up the environment from scratch:
|
|
|
-
|
|
|
-* Navigate to the MSYS2_ installer page and download the ``msys2-i686-xxxxxxx.exe`` installer executable (we only support a 32-bit MSYS environment, it works on both 32-bit and 64-bit Windows.)
|
|
|
-
|
|
|
-* Run through the installer steps, and accept the "Run MSYS2 now" option at the end. A window will open with a MSYS2 terminal.
|
|
|
-
|
|
|
-* The ESP-IDF repository on github contains a script in the tools directory titled ``windows_install_prerequisites.sh``. If you haven't downloaded the ESP-IDF yet, that's OK - you can just download that one file in Raw format from here: :idf_raw:`tools/windows/windows_install_prerequisites.sh`. Save it somewhere on your computer.
|
|
|
-
|
|
|
-* Type the path to the shell script into the MSYS2 terminal window. You can type it as a normal Windows path, but use forward-slashes instead of back-slashes. ie: ``C:/Users/myuser/Downloads/windows_install_prerequisites.sh``. You can read the script beforehand to check what it does.
|
|
|
-
|
|
|
-* If you use the 201602 MSYS2 installer, the first time you run ``windows_install_prerequisites.sh`` it will update the MSYS2 core system. At the end of this update, you will be prompted to close the MSYS2 terminal and re-open. When you re-open after the update, re-run ``windows_install_prerequisites.sh``. The next version of MSYS2 (after 201602) will not need this interim step.
|
|
|
-
|
|
|
-* The ``windows_install_prerequisites.sh`` script will download and install packages for ESP-IDF support, and the ESP32 toolchain.
|
|
|
-
|
|
|
-Note: You may encounter a bug where svchost.exe uses 100% CPU in Windows after setup is finished, resulting in the ESP-IDF building very slowly. Terminating svchost.exe or restarting Windows will solve this problem.
|
|
|
+Rather than use the pre-prepared environment, you can :doc:`alternatively follow this guide to set up the MSYS2 environment from scratch <windows-setup-scratch>`.
|
|
|
|
|
|
Another Alternative Step 1: Just download a toolchain
|
|
|
=====================================================
|
|
|
@@ -40,14 +24,14 @@ If you already have an MSYS2 install or want to do things differently, you can d
|
|
|
|
|
|
https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0.zip
|
|
|
|
|
|
-If you followed one of the above options for Step 1, you won't need this download.
|
|
|
+**If you followed one of the above options for Step 1, you already have the toolchain and you won't need this download.**
|
|
|
|
|
|
-Important: Just having this toolchain is *not enough* to use ESP-IDF on Windows. You will need GNU make, bash, and sed at minimum. The above environments provide all this, plus a host compiler (required for menuconfig support).
|
|
|
+**Important**: Just having this toolchain is *not enough* to use ESP-IDF on Windows. You will need GNU make, bash, and sed at minimum. The above environments provide all this, plus a host compiler (required for menuconfig support).
|
|
|
|
|
|
Step 2: Getting the esp-idf repository from github
|
|
|
==================================================
|
|
|
|
|
|
-Open an MSYS2 terminal window by running ``C:\msys32\msys2_shell.cmd``. The environment in this window is a bash shell.
|
|
|
+Open an MSYS2 terminal window by running ``C:\msys32\mingw32.exe``. The environment in this window is a bash shell.
|
|
|
|
|
|
Change to the directory you want to clone the SDK into by typing a command like this one: ``cd "C:/path/to/dir"`` (note the forward-slashes in the path). Then type ``git clone --recursive https://github.com/espressif/esp-idf.git``
|
|
|
|
|
|
@@ -66,6 +50,9 @@ The process is the same as for checking out the ESP-IDF from github. Change to t
|
|
|
|
|
|
**IMPORTANT:** The esp-idf build system does not support spaces in paths to esp-idf or to projects.
|
|
|
|
|
|
+You can also find a range of example projects under the "examples" directory in IDF. These example project directories can be copied to outside IDF in order to begin your own projects.
|
|
|
+
|
|
|
+
|
|
|
Step 4: Configuring the project
|
|
|
===============================
|
|
|
|