windows-setup.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ***********************************************
  2. Standard Setup of Toolchain for Windows
  3. ***********************************************
  4. :link_to_translation:`zh_CN:[中文]`
  5. .. only:: esp32
  6. .. note::
  7. Currently only 64-bit versions of Windows are supported. 32-bit Windows can use the :doc:`Legacy GNU Make Build System<../get-started-legacy/windows-setup>`.
  8. Introduction
  9. ============
  10. ESP-IDF requires some prerequisite tools to be installed so you can build firmware for supported chips. The prerequisite tools include Python, Git, cross-compilers, CMake and Ninja build tools.
  11. For this Getting Started we're going to use the Command Prompt, but after ESP-IDF is installed you can use :doc:`Eclipse <eclipse-setup>` or another graphical IDE with CMake support instead.
  12. .. only:: esp32
  13. .. note::
  14. Previous versions of ESP-IDF used the :doc:`Legacy GNU Make Build System<../get-started-legacy/windows-setup>` and MSYS2_ Unix compatibility environment. This is no longer required, ESP-IDF can be used from the Windows Command Prompt.
  15. .. note::
  16. Limitation: the installation path of Python or ESP-IDF must not contain white spaces or parentheses.
  17. Limitation: the installation path of Python or ESP-IDF should not contain special characters (non-ASCII) unless the operating system is configured with "Unicode UTF-8" support.
  18. System Administrator can enable the support via Control Panel - Change date, time, or number formats - Administrative tab - Change system locale - check the option "Beta: Use Unicode UTF-8 for worldwide language support" - Ok and reboot the computer.
  19. .. _get-started-windows-tools-installer:
  20. ESP-IDF Tools Installer
  21. =======================
  22. The easiest way to install ESP-IDF's prerequisites is to download the ESP-IDF Tools installer from this URL:
  23. https://dl.espressif.com/dl/esp-idf-tools-setup-2.4.exe
  24. .. IMPORTANT: Next time this link is updated, please go to get-started/index.rst and rewrite the section under "Alternative File Downloads ... Windows". Then delete this comment.
  25. The installer includes the cross-compilers, OpenOCD, CMake_ and Ninja_ build tool. The installer can also download and run installers for Python_ 3.7 and `Git For Windows`_ if they are not already installed on the computer.
  26. The installer also downloads one of the ESP-IDF release versions, or offers to use an existing one, if already present on your PC. If you don't have one, please choose a directory for downloading ESP-IDF. The recommended directory is ``%userprofile%\esp`` where ``%userprofile%`` is your home directory. If you do not have it yet, please run the following command to create a new one:
  27. .. code-block:: batch
  28. mkdir %userprofile%\esp
  29. At the end of installation, if you checkout ``Run ESP-IDF Command Prompt (cmd.exe)``, a new Windows Power Shell, i.e. the ESP-IDF Command Prompt will pop up.
  30. .. figure:: ../../_static/esp-idf-installer-screenshot.png
  31. :align: center
  32. :alt: Completing the ESP-IDF Tools Setup Wizard with Run ESP-IDF Command Prompt (cmd.exe)
  33. :figclass: align-center
  34. Completing the ESP-IDF Tools Setup Wizard with Run ESP-IDF Command Prompt (cmd.exe)
  35. .. figure:: ../../_static/esp-idf-installer-command-prompt.png
  36. :align: center
  37. :alt: ESP-IDF Command Prompt
  38. :figclass: align-center
  39. ESP-IDF Command Prompt
  40. Using the Command Prompt
  41. ========================
  42. For the remaining Getting Started steps, we're going to use the Windows Command Prompt.
  43. ESP-IDF Tools Installer also creates a shortcut in the Start menu to launch the ESP-IDF Command Prompt. This shortcut launches the Command Prompt (cmd.exe) and runs ``export.bat`` script to set up the environment variables (``PATH``, ``IDF_PATH`` and others). Inside this command prompt, all the installed tools are available.
  44. Note that this shortcut is specific to the ESP-IDF directory selected in the ESP-IDF Tools Installer. If you have multiple ESP-IDF directories on the computer (for example, to work with different versions of ESP-IDF), you have two options to use them:
  45. 1. Create a copy of the shortcut created by the ESP-IDF Tools Installer, and change the working directory of the new shortcut to the ESP-IDF directory you wish to use.
  46. 2. Alternatively, run ``cmd.exe``, then change to the ESP-IDF directory you wish to use, and run ``export.bat``. Note that unlike the previous option, this way requires Python and Git to be present in ``PATH``. If you get errors related to Python or Git not being found, use the first option.
  47. Next Steps
  48. ==========
  49. If the ESP-IDF Tools Installer has finished successfully, then the development environment setup is complete. Proceed directly to :ref:`get-started-start-project`.
  50. Related Documents
  51. =================
  52. For advanced users who want to customize the install process:
  53. .. toctree::
  54. :maxdepth: 1
  55. windows-setup-update
  56. .. _MSYS2: https://www.msys2.org/
  57. .. _CMake: https://cmake.org/download/
  58. .. _Ninja: https://ninja-build.org/
  59. .. _Python: https://www.python.org/downloads/windows/
  60. .. _Git for Windows: https://gitforwindows.org/
  61. .. _Github Desktop: https://desktop.github.com/