diff --git a/docs/_static/esp-idf-installer-command-prompt.png b/docs/_static/esp-idf-installer-command-prompt.png new file mode 100644 index 0000000000..997a97d29f Binary files /dev/null and b/docs/_static/esp-idf-installer-command-prompt.png differ diff --git a/docs/_static/esp-idf-installer-powershell.png b/docs/_static/esp-idf-installer-powershell.png new file mode 100644 index 0000000000..b061de9363 Binary files /dev/null and b/docs/_static/esp-idf-installer-powershell.png differ diff --git a/docs/_static/esp-idf-installer-screenshot-powershell.png b/docs/_static/esp-idf-installer-screenshot-powershell.png new file mode 100644 index 0000000000..fc61d770ec Binary files /dev/null and b/docs/_static/esp-idf-installer-screenshot-powershell.png differ diff --git a/docs/_static/esp-idf-installer-screenshot.png b/docs/_static/esp-idf-installer-screenshot.png new file mode 100644 index 0000000000..c3e748bdb0 Binary files /dev/null and b/docs/_static/esp-idf-installer-screenshot.png differ diff --git a/docs/en/get-started/windows-setup.rst b/docs/en/get-started/windows-setup.rst index 3923fa6396..ef1c4e015f 100644 --- a/docs/en/get-started/windows-setup.rst +++ b/docs/en/get-started/windows-setup.rst @@ -4,38 +4,99 @@ Standard Setup of Toolchain for Windows :link_to_translation:`zh_CN:[中文]` -.. note:: - 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>`. +.. only:: esp32 + + .. note:: + 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>`. Introduction ============ -ESP-IDF requires some prerequisite tools to be installed so you can build firmware for the ESP32. The prerequisite tools include Python, Git, cross-compilers, menuconfig tool, CMake and Ninja build tools. +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. For this Getting Started we're going to use the Command Prompt, but after ESP-IDF is installed you can use :doc:`Eclipse ` or another graphical IDE with CMake support instead. +.. only:: esp32 + + .. 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. + .. 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. + 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: 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.0 -https://dl.espressif.com/dl/esp-idf-tools-setup-2.3.exe +What is the usecase for Online and Offline Installer +---------------------------------------------------- -The installer includes the cross-compilers, OpenOCD, cmake_ and Ninja_ build tool, and a configuration tool called mconf-idf_. 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. +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 also offers to download one of the ESP-IDF release versions. +Offline Installer does not require any network connection. The installer contains all required dependencies including `Git For Windows`_ . + +Components of the installation +------------------------------ + +The installer deploys the following components: + +- Embedded Python +- Cross-compilers +- OpenOCD +- CMake_ and Ninja_ build tools +- ESP-IDF + +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 ======================== 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: @@ -58,10 +119,10 @@ For advanced users who want to customize the install process: windows-setup-update + .. _MSYS2: https://www.msys2.org/ -.. _cmake: https://cmake.org/download/ -.. _ninja: https://ninja-build.org/ +.. _CMake: https://cmake.org/download/ +.. _Ninja: https://ninja-build.org/ .. _Python: https://www.python.org/downloads/windows/ .. _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/ \ No newline at end of file diff --git a/docs/zh_CN/get-started/windows-setup.rst b/docs/zh_CN/get-started/windows-setup.rst index e1dfce0c5d..bba1bee39d 100644 --- a/docs/zh_CN/get-started/windows-setup.rst +++ b/docs/zh_CN/get-started/windows-setup.rst @@ -4,52 +4,113 @@ Windows 平台工具链的标准设置 :link_to_translation:`en:[English]` -.. note:: - 目前,基于 CMake 的构建系统仅支持 64 位 Windows 版本。32 位 Windows 版本的用户可根据 :doc:`传统 GNU Make 构建系统<../get-started-legacy/windows-setup>` 中的介绍进行操作。 +.. only:: esp32 + + .. 注解:: + 目前,基于 CMake 的构建系统仅支持 64 位 Windows 版本。32 位 Windows 版本的用户可根据 :doc:`传统 GNU Make 构建系统<../get-started-legacy/windows-setup>` 中的介绍进行操作。 概述 -==== +============ -ESP-IDF 需要安装一些必备工具,才能围绕 ESP32 构建固件,包括 Python、Git、交叉编译器、menuconfig 工具、CMake和 Ninja 编译工具等。 +ESP-IDF 需要安装一些必备工具,才能围绕 {IDF_TARGET_NAME} 构建固件,包括 Python、Git、交叉编译器、CMake 和 Ninja 编译工具等。 在本入门指南中,我们通过 **命令提示符** 进行有关操作。不过,您在安装 ESP-IDF 后还可以使用 :doc:`Eclipse ` 或其他支持 CMake 的图形化工具 IDE。 -.. note:: - 较早 ESP-IDF 版本使用 :doc:`传统 GNU Make 编译系统<../get-started-legacy/windows-setup>` 和 MSYS2_ Unix 兼容环境。但如今已非必需,用户可直接通过 Windows 命令提示符使用 ESP-IDF。 +.. only:: esp32 + + .. 注解:: + 较早 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: + ESP-IDF 工具安装器 ======================= -要安装 ESP-IDF 必备工具,最简易的方式是下载 ESP-IDF 工具安装器,地址如下: +安装 ESP-IDF 必备工具最简易的方式是从 https://dl.espressif.com/dl/esp-idf/?idf=4.0 中下载 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 命令提示符窗口 使用命令提示符 -=============== +======================== 在后续步骤中,我们将使用 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` 查看。 相关文档 -======== +================= 想要自定义安装流程的高阶用户可参照: @@ -58,10 +119,10 @@ ESP-IDF 工具安装器可在“开始”菜单中,创建一个打开 ESP-IDF windows-setup-update -.. _MSYS2: https://msys2.github.io/ -.. _cmake: https://cmake.org/download/ -.. _ninja: https://ninja-build.org/ + +.. _MSYS2: https://www.msys2.org/ +.. _CMake: https://cmake.org/download/ +.. _Ninja: https://ninja-build.org/ .. _Python: https://www.python.org/downloads/windows/ .. _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/ \ No newline at end of file