mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
docs: update Windows Tools 2.9 installation
This commit is contained in:
BIN
docs/_static/esp-idf-installer-command-prompt.png
vendored
Normal file
BIN
docs/_static/esp-idf-installer-command-prompt.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 157 KiB |
BIN
docs/_static/esp-idf-installer-powershell.png
vendored
Normal file
BIN
docs/_static/esp-idf-installer-powershell.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
BIN
docs/_static/esp-idf-installer-screenshot-powershell.png
vendored
Normal file
BIN
docs/_static/esp-idf-installer-screenshot-powershell.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 KiB |
BIN
docs/_static/esp-idf-installer-screenshot.png
vendored
Normal file
BIN
docs/_static/esp-idf-installer-screenshot.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 KiB |
@ -21,33 +21,82 @@ For this Getting Started we're going to use the Command Prompt, but after ESP-ID
|
|||||||
.. note::
|
.. note::
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Limitation: the installation path of Python or ESP-IDF must not contain white spaces or parentheses.
|
||||||
|
|
||||||
|
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.
|
||||||
|
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.
|
||||||
|
|
||||||
.. _get-started-windows-tools-installer:
|
.. _get-started-windows-tools-installer:
|
||||||
|
|
||||||
ESP-IDF Tools Installer
|
ESP-IDF Tools Installer
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
The easiest way to install ESP-IDF's prerequisites is to download the ESP-IDF Tools installer from this URL:
|
The easiest way to install ESP-IDF's prerequisites is to download one of ESP-IDF Tools Installers from this URL: https://dl.espressif.com/dl/esp-idf/?idf=4.2
|
||||||
|
|
||||||
https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe
|
What is the usecase for Online and Offline Installer
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
.. 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.
|
Online Installer is very small and allows the installation of all available releases of ESP-IDF. The installer will download only necessary dependencies including `Git For Windows`_ during the installation process. The installer stores downloaded files in the cache directory ``%userprofile%\.espressif``
|
||||||
|
|
||||||
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.
|
Offline Installer does not require any network connection. The installer contains all required dependencies including `Git For Windows`_ .
|
||||||
|
|
||||||
The installer also offers to download one of the ESP-IDF release versions. 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:
|
Components of the installation
|
||||||
|
------------------------------
|
||||||
|
|
||||||
.. code-block:: batch
|
The installer deploys the following components:
|
||||||
|
|
||||||
mkdir %userprofile%\esp
|
- Embedded Python
|
||||||
|
- Cross-compilers
|
||||||
|
- OpenOCD
|
||||||
|
- CMake_ and Ninja_ build tools
|
||||||
|
- ESP-IDF
|
||||||
|
|
||||||
The installer also offers to download one of the ESP-IDF release versions.
|
The installer also allows reusing the existing directory with ESP-IDF. The recommended directory is ``%userprofile%\Desktop\esp-idf`` where ``%userprofile%`` is your home directory.
|
||||||
|
|
||||||
|
Launching ESP-IDF Environment
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
At the end of the installation process you can check out option ``Run ESP-IDF PowerShell Environment`` or ``Run ESP-IDF Command Prompt (cmd.exe)``. The installer will launch ESP-IDF environment in selected prompt.
|
||||||
|
|
||||||
|
``Run ESP-IDF PowerShell Environment``:
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-screenshot-powershell.png
|
||||||
|
:align: center
|
||||||
|
:alt: Completing the ESP-IDF Tools Setup Wizard with Run ESP-IDF PowerShell Environment
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
Completing the ESP-IDF Tools Setup Wizard with Run ESP-IDF PowerShell Environment
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-powershell.png
|
||||||
|
:align: center
|
||||||
|
:alt: ESP-IDF PowerShell
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
ESP-IDF PowerShell
|
||||||
|
|
||||||
|
``Run ESP-IDF Command Prompt (cmd.exe)``:
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-screenshot.png
|
||||||
|
:align: center
|
||||||
|
:alt: Completing the ESP-IDF Tools Setup Wizard with Run ESP-IDF Command Prompt (cmd.exe)
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
Completing the ESP-IDF Tools Setup Wizard with Run ESP-IDF Command Prompt (cmd.exe)
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-command-prompt.png
|
||||||
|
:align: center
|
||||||
|
:alt: ESP-IDF Command Prompt
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
ESP-IDF Command Prompt
|
||||||
|
|
||||||
Using the Command Prompt
|
Using the Command Prompt
|
||||||
========================
|
========================
|
||||||
|
|
||||||
For the remaining Getting Started steps, we're going to use the Windows Command Prompt.
|
For the remaining Getting Started steps, we're going to use the Windows Command Prompt.
|
||||||
|
|
||||||
ESP-IDF Tools Installer 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.
|
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.
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
@ -73,7 +122,7 @@ For advanced users who want to customize the install process:
|
|||||||
|
|
||||||
.. _MSYS2: https://www.msys2.org/
|
.. _MSYS2: https://www.msys2.org/
|
||||||
.. _CMake: https://cmake.org/download/
|
.. _CMake: https://cmake.org/download/
|
||||||
.. _ninja: https://ninja-build.org/
|
.. _Ninja: https://ninja-build.org/
|
||||||
.. _Python: https://www.python.org/downloads/windows/
|
.. _Python: https://www.python.org/downloads/windows/
|
||||||
.. _Git for Windows: https://gitforwindows.org/
|
.. _Git for Windows: https://gitforwindows.org/
|
||||||
.. _Github Desktop: https://desktop.github.com/
|
.. _Github Desktop: https://desktop.github.com/
|
@ -6,33 +6,90 @@ Windows 平台工具链的标准设置
|
|||||||
|
|
||||||
.. only:: esp32
|
.. only:: esp32
|
||||||
|
|
||||||
.. note::
|
.. 注解::
|
||||||
目前,基于 CMake 的构建系统仅支持 64 位 Windows 版本。32 位 Windows 版本的用户可根据 :doc:`传统 GNU Make 构建系统<../get-started-legacy/windows-setup>` 中的介绍进行操作。
|
目前,基于 CMake 的构建系统仅支持 64 位 Windows 版本。32 位 Windows 版本的用户可根据 :doc:`传统 GNU Make 构建系统<../get-started-legacy/windows-setup>` 中的介绍进行操作。
|
||||||
|
|
||||||
概述
|
概述
|
||||||
============
|
============
|
||||||
|
|
||||||
ESP-IDF 需要安装一些必备工具,才能围绕 {IDF_TARGET_NAME} 构建固件,包括 Python、Git、交叉编译器、menuconfig 工具、CMake和 Ninja 编译工具等。
|
ESP-IDF 需要安装一些必备工具,才能围绕 {IDF_TARGET_NAME} 构建固件,包括 Python、Git、交叉编译器、CMake 和 Ninja 编译工具等。
|
||||||
|
|
||||||
在本入门指南中,我们通过 **命令提示符** 进行有关操作。不过,您在安装 ESP-IDF 后还可以使用 :doc:`Eclipse <eclipse-setup>` 或其他支持 CMake 的图形化工具 IDE。
|
在本入门指南中,我们通过 **命令提示符** 进行有关操作。不过,您在安装 ESP-IDF 后还可以使用 :doc:`Eclipse <eclipse-setup>` 或其他支持 CMake 的图形化工具 IDE。
|
||||||
|
|
||||||
.. only:: esp32
|
.. only:: esp32
|
||||||
|
|
||||||
.. note::
|
.. 注解::
|
||||||
较早 ESP-IDF 版本使用 :doc:`传统 GNU Make 编译系统<../get-started-legacy/windows-setup>` 和 MSYS2_ Unix 兼容环境。但如今已非必需,用户可直接通过 Windows 命令提示符使用 ESP-IDF。
|
较早 ESP-IDF 版本使用 :doc:`传统 GNU Make 构建系统<../get-started-legacy/windows-setup>` 和 MSYS2_ Unix 兼容环境。但如今已非必需,用户可直接通过 Windows 命令提示符使用 ESP-IDF。
|
||||||
|
|
||||||
|
.. 注解::
|
||||||
|
限定条件:Python 或 ESP-IDF 的安装路径中一定不能包含空格或括号。与此同时,除非操作系统配置为支持 Unicode UTF-8,否则 Python 或 ESP-IDF 的安装路径中也不能包括特殊字符(非 ASCII 码字符)
|
||||||
|
|
||||||
|
系统管理员可以通过如下方式将操作系统配置为支持 Unicode UTF-8:控制面板-更改日期、时间或数字格式-管理选项卡-更改系统地域-勾选选项 “Beta:使用 Unicode UTF-8 支持全球语言”-点击确定-重启电脑。
|
||||||
|
|
||||||
.. _get-started-windows-tools-installer:
|
.. _get-started-windows-tools-installer:
|
||||||
|
|
||||||
|
|
||||||
ESP-IDF 工具安装器
|
ESP-IDF 工具安装器
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
要安装 ESP-IDF 必备工具,最简易的方式是下载 ESP-IDF 工具安装器,地址如下:
|
安装 ESP-IDF 必备工具最简易的方式是从 https://dl.espressif.com/dl/esp-idf/?idf=4.2 中下载 ESP-IDF 工具安装器。
|
||||||
|
|
||||||
https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe
|
在线安装与离线安装的区别
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
本安装器可为您安装所需的交叉编译器、OpenOCD、cmake_ 和 Ninja_ 编译工具,以及一款 mconf-idf_ 配置工具。此外,本安装器还可在有需要时下载、运行 Python_ 3.7 和 `Git For Windows` 的安装器。
|
在线安装程序非常小,可以安装 ESP-IDF 的所有版本。在安装过程中,安装程序只下载必要的依赖文件,包括 `Git For Windows`_ 安装器。在线安装程序会将下载的文件存储在缓存目录 ``%userprofile%/espressif`` 中。
|
||||||
|
|
||||||
本安装器还可用于下载任意 ESP-IDF 发布版本。
|
离线安装程序不需要任何网络连接。安装程序中包含了所有需要的依赖文件,包括 `Git For Windows`_ 安装器。
|
||||||
|
|
||||||
|
安装内容
|
||||||
|
------------
|
||||||
|
|
||||||
|
安装程序会安装以下组件:
|
||||||
|
|
||||||
|
- 内置的 Python
|
||||||
|
- 交叉编译器
|
||||||
|
- OpenOCD
|
||||||
|
- CMake_ 和 Ninja_ 编译工具
|
||||||
|
- ESP-IDF
|
||||||
|
|
||||||
|
安装程序允许将程序下载到现有的 ESP-IDF 目录。推荐将 ESP-IDF 下载到 ``%userprofile%\Desktop\esp-idf`` 目录下,其中 ``%userprofile%`` 代表家目录。
|
||||||
|
|
||||||
|
启动 ESP-IDF 环境
|
||||||
|
------------------
|
||||||
|
|
||||||
|
安装结束时,如果勾选了 ``Run ESP-IDF PowerShell Environment`` 或 ``Run ESP-IDF Command Prompt (cmd.exe)``,安装程序会在选定的提示符窗口启动 ESP-IDF。
|
||||||
|
|
||||||
|
``Run ESP-IDF PowerShell Environment``:
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-screenshot-powershell.png
|
||||||
|
:align: center
|
||||||
|
:alt: 完成 ESP-IDF 工具安装向导时运行 Run ESP-IDF PowerShell Environment
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
完成 ESP-IDF 工具安装向导时运行 Run ESP-IDF PowerShell Environment
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-powershell.png
|
||||||
|
:align: center
|
||||||
|
:alt: ESP-IDF PowerShell
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
ESP-IDF PowerShell
|
||||||
|
|
||||||
|
``Run ESP-IDF Command Prompt (cmd.exe)``:
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-screenshot.png
|
||||||
|
:align: center
|
||||||
|
:alt: 完成 ESP-IDF 工具安装向导时运行 Run ESP-IDF Command Prompt (cmd.exe)
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
完成 ESP-IDF 工具安装向导时运行 Run ESP-IDF Command Prompt (cmd.exe)
|
||||||
|
|
||||||
|
.. figure:: ../../_static/esp-idf-installer-command-prompt.png
|
||||||
|
:align: center
|
||||||
|
:alt: ESP-IDF 命令提示符窗口
|
||||||
|
:figclass: align-center
|
||||||
|
|
||||||
|
ESP-IDF 命令提示符窗口
|
||||||
|
|
||||||
使用命令提示符
|
使用命令提示符
|
||||||
========================
|
========================
|
||||||
@ -41,16 +98,16 @@ https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe
|
|||||||
|
|
||||||
ESP-IDF 工具安装器可在“开始”菜单中,创建一个打开 ESP-IDF 命令提示符窗口的快捷方式。本快捷方式可以打开 Windows 命令提示符(即 cmd.exe),并运行 ``export.bat`` 脚本以设置各环境变量(比如 ``PATH``,``IDF_PATH`` 等)。此外,您可还以通过 Windows 命令提示符使用各种已经安装的工具。
|
ESP-IDF 工具安装器可在“开始”菜单中,创建一个打开 ESP-IDF 命令提示符窗口的快捷方式。本快捷方式可以打开 Windows 命令提示符(即 cmd.exe),并运行 ``export.bat`` 脚本以设置各环境变量(比如 ``PATH``,``IDF_PATH`` 等)。此外,您可还以通过 Windows 命令提示符使用各种已经安装的工具。
|
||||||
|
|
||||||
注意,本快捷方式仅适用 ESP-IDF 工具安装器中指定的 ESP-IDF 路径。如果您的电脑上存在多个 ESP-IDF(比如您需要不同的 ESP-IDF 版本)需要使用快捷方式,您可以:
|
注意,本快捷方式仅适用 ESP-IDF 工具安装器中指定的 ESP-IDF 路径。如果您的电脑上存在多个 ESP-IDF 路径(比如您需要不同版本的 ESP-IDF),您有以下两种解决方法:
|
||||||
|
|
||||||
1. 为 ESP-IDF 工具安装器创建的快捷方式创建一个副本,并将新快捷方式的“当前路径”指定为您希望使用的 ESP-IDF 路径。
|
1. 为 ESP-IDF 工具安装器创建的快捷方式创建一个副本,并将新快捷方式的 ESP-IDF 工作路径指定为您希望使用的 ESP-IDF 路径。
|
||||||
|
|
||||||
2. 运行 ``cmd.exe``,并更新至您希望使用的 ESP-IDF 目录,然后运行 ``export.bat``。注意,这种方法要求 ``PATH`` 中存在 Python 和 Git。如果您在使用时遇到有关“找不到 Python 或 Git” 的错误信息,请使用第一种方法。
|
2. 或者,您可以运行 ``cmd.exe``,并切换至您希望使用的 ESP-IDF 目录,然后运行 ``export.bat``。注意,这种方法要求 ``PATH`` 中存在 Python 和 Git。如果您在使用时遇到有关“找不到 Python 或 Git”的错误信息,请使用第一种方法。
|
||||||
|
|
||||||
后续步骤
|
后续步骤
|
||||||
==========
|
============
|
||||||
|
|
||||||
当 ESP-IDF 工具安装器安装完成后,则开发环境设置也到此结束。后续开发步骤,请前往 :ref:`get-started-start-project` 查看。
|
当 ESP-IDF 工具安装器安装成功后,开发环境设置也到此结束。后续开发步骤,请前往 :ref:`get-started-start-project` 查看。
|
||||||
|
|
||||||
相关文档
|
相关文档
|
||||||
=================
|
=================
|
||||||
@ -62,11 +119,10 @@ ESP-IDF 工具安装器可在“开始”菜单中,创建一个打开 ESP-IDF
|
|||||||
|
|
||||||
windows-setup-update
|
windows-setup-update
|
||||||
|
|
||||||
|
|
||||||
.. _MSYS2: https://www.msys2.org/
|
.. _MSYS2: https://www.msys2.org/
|
||||||
.. _cmake: https://cmake.org/download/
|
.. _CMake: https://cmake.org/download/
|
||||||
.. _ninja: https://ninja-build.org/
|
.. _Ninja: https://ninja-build.org/
|
||||||
.. _Python: https://www.python.org/downloads/windows/
|
.. _Python: https://www.python.org/downloads/windows/
|
||||||
.. _Git for Windows: https://gitforwindows.org/
|
.. _Git for Windows: https://gitforwindows.org/
|
||||||
.. _mconf-idf: https://github.com/espressif/kconfig-frontends/releases/
|
.. _Github Desktop: https://desktop.github.com/
|
||||||
.. _Github Desktop: https://desktop.github.com/
|
|
||||||
|
|
Reference in New Issue
Block a user