docs: update all documents in get started section and keep line number consistent

pull/6951/merge
daiziyan 2021-07-22 15:54:47 +08:00
rodzic 69650e0c18
commit ce916db7ed
24 zmienionych plików z 52 dodań i 86 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
********************************
Build and Flash with Eclipse IDE
********************************
:link_to_translation:`zh_CN:[中文]`
ESP-IDF V4.0 has a new CMake-based build system as the default build system.

Wyświetl plik

@ -11,7 +11,6 @@ Connect {IDF_TARGET_NAME} to PC
Connect the {IDF_TARGET_NAME} board to the PC using the USB cable. If device driver does not install automatically, identify USB to serial converter chip on your {IDF_TARGET_NAME} board (or external converter dongle), search for drivers in internet and install them.
Below is the list of USB to serial converter chips installed on most of the {IDF_TARGET_NAME} boards produced by Espressif together with links to the drivers:
* CP210x: `CP210x USB to UART Bridge VCP Drivers <https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers>`_
@ -19,7 +18,6 @@ Below is the list of USB to serial converter chips installed on most of the {IDF
Please check the board user guide for specific USB to serial converter chip used. The drivers above are primarily for reference. Under normal circumstances, the drivers should be bundled with an operating system and automatically installed upon connecting the board to the PC.
Check port on Windows
---------------------
@ -134,6 +132,7 @@ To spare you the trouble of installing a serial terminal program, macOS offers t
Do not forget to **exit the screen session** after verifying that the communication is working. If you fail to do it and just close the terminal window, the serial port will be inaccessible for uploading firmware later.
Example Output
^^^^^^^^^^^^^^
@ -170,4 +169,4 @@ If you can see readable log output, it means serial connection is working and yo
If you got here from :ref:`get-started-connect` when installing s/w for {IDF_TARGET_NAME} development, then you can continue with :ref:`get-started-configure`.
.. _esptool documentation: https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader
.. _esptool documentation: https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader

Wyświetl plik

@ -13,9 +13,7 @@ Get Started
.. Please keep README.md in sync with these instructions.
This document is intended to help you set up the software development environment for the hardware based on the {IDF_TARGET_NAME} chip by Espressif.
After that, a simple example will show you how to use ESP-IDF (Espressif IoT Development Framework) for menu configuration, then for building and flashing firmware onto an {IDF_TARGET_NAME} board.
This document is intended to help you set up the software development environment for the hardware based on the {IDF_TARGET_NAME} chip by Espressif. After that, a simple example will show you how to use ESP-IDF (Espressif IoT Development Framework) for menu configuration, then for building and flashing firmware onto an {IDF_TARGET_NAME} board.
.. include-build-file:: inc/version-note.inc
@ -32,7 +30,6 @@ Introduction
* Ultra Low Power co-processor
* Multiple peripherals
.. only:: esp32s2
* Wi-Fi (2.4 GHz band)
@ -141,7 +138,6 @@ If you have one of {IDF_TARGET_NAME} development boards listed below, you can cl
ESP32-S3-DevKitC-1 <../hw-reference/esp32s3/user-guide-devkitc-1>
.. _get-started-step-by-step:
Installation Step by Step
@ -399,9 +395,7 @@ Windows
cd %userprofile%\esp
xcopy /e /i %IDF_PATH%\examples\get-started\hello_world hello_world
There is a range of example projects in the :idf:`examples` directory in ESP-IDF. You can copy any project in the same way as presented above and run it.
It is also possible to build examples in-place, without copying them first.
There is a range of example projects in the :idf:`examples` directory in ESP-IDF. You can copy any project in the same way as presented above and run it. It is also possible to build examples in-place, without copying them first.
.. important::
@ -473,8 +467,7 @@ You are using this menu to set up project specific variables, e.g. Wi-Fi network
.. note::
The colors of the menu could be different in your terminal. You can change the appearance with the option
``--style``. Please run ``idf.py menuconfig --help`` for further information.
The colors of the menu could be different in your terminal. You can change the appearance with the option ``--style``. Please run ``idf.py menuconfig --help`` for further information.
.. _get-started-build:

Wyświetl plik

@ -77,9 +77,7 @@ Toolchain will be built in ``~/esp/crosstool-NG/builds/{IDF_TARGET_TOOLCHAIN_PRE
Add Toolchain to PATH
=====================
The custom toolchain needs to be copied to a binary directory and added to the ``PATH``.
Choose a directory, for example ``~/esp/{IDF_TARGET_TOOLCHAIN_PREFIX}/``, and copy the build output to this directory.
The custom toolchain needs to be copied to a binary directory and added to the ``PATH``. Choose a directory, for example ``~/esp/{IDF_TARGET_TOOLCHAIN_PREFIX}/``, and copy the build output to this directory.
To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``{IDF_TARGET_TOOLCHAIN_PREFIX}`` available for all terminal sessions, add the following line to your ``~/.profile`` file::

Wyświetl plik

@ -38,10 +38,7 @@ With some Linux distributions you may get the ``Failed to open port /dev/ttyUSB0
Python compatibility
====================
ESP-IDF supports Python 3.6 or newer. It is recommended to upgrade your operating system to a recent version
satisfying this requirement. Other options include the installation of Python from
`sources <https://www.python.org/downloads/>`_ or the use of a Python version management system such as
`pyenv <https://github.com/pyenv/pyenv>`_.
ESP-IDF supports Python 3.6 or newer. It is recommended to upgrade your operating system to a recent version satisfying this requirement. Other options include the installation of Python from `sources <https://www.python.org/downloads/>`_ or the use of a Python version management system such as `pyenv <https://github.com/pyenv/pyenv>`_.
Next Steps
==========

Wyświetl plik

@ -40,7 +40,7 @@ Install Prerequisites
Compile the Toolchain from Source
=================================
- Install dependencies:
Install dependencies:
- with MacPorts::
@ -82,4 +82,4 @@ Toolchain will be built in ``~/esp/ctng-volume/crosstool-NG/builds/{IDF_TARGET_T
Next Steps
==========
To carry on with development environment setup, proceed to :ref:`get-started-get-esp-idf`.
To carry on with development environment setup, proceed to :ref:`get-started-get-esp-idf`.

Wyświetl plik

@ -57,13 +57,11 @@ Below is an overview of steps to install Python 3.
sudo port install python38
Next Steps
==========
To carry on with development environment setup, proceed to :ref:`get-started-get-esp-idf`.
.. _cmake: https://cmake.org/
.. _ninja: https://ninja-build.org/
.. _ccache: https://ccache.samba.org/

Wyświetl plik

@ -23,5 +23,4 @@ In any case, here are the instructions to compile the toolchain yourself.
windows-setup-scratch
linux-setup-scratch
macos-setup-scratch
macos-setup-scratch

Wyświetl plik

@ -28,7 +28,6 @@ Supported Features
* `Rainmaker Cloud <https://rainmaker.espressif.com/>`_, we have inbuilt Rainmaker Cloud support where you can edit/read state of your connected IoT devices easily.
* **Code Coverage**, we have inbuilt code coverage support which shall highlight in color which line have been covered. We also render the existing HTML report directly inside the IDE.
Bugs & Feature Requests
=======================

Wyświetl plik

@ -114,5 +114,4 @@ To carry on with development environment setup, proceed to :ref:`get-started-set
.. _kconfig-frontends releases page: https://github.com/espressif/kconfig-frontends/releases
.. Note: These two targets may be used from git-clone-notes.inc depending on version, don't remove
.. _Stable version: https://docs.espressif.com/projects/esp-idf/en/stable/
.. _Releases page: https://github.com/espressif/esp-idf/releases
.. _Releases page: https://github.com/espressif/esp-idf/releases

Wyświetl plik

@ -17,8 +17,7 @@ For Powershell, change to the directory where ESP-IDF is installed. Then run::
install.ps1
This will download and install the tools necessary to use ESP-IDF. If the specific version of the tool is already installed, no action will be taken.
The tools are downloaded and installed into a directory specified during ESP-IDF Tools Installer process. By default, this is ``C:\Users\username\.espressif``.
This will download and install the tools necessary to use ESP-IDF. If the specific version of the tool is already installed, no action will be taken. The tools are downloaded and installed into a directory specified during ESP-IDF Tools Installer process. By default, this is ``C:\Users\username\.espressif``.
.. _get-started-export_bat-windows:
@ -39,4 +38,4 @@ Alternatively in the Powershell where you need to use ESP-IDF, change to the dir
cd ~/esp/esp-idf
export.ps1
When this is done, the tools will be available in this command prompt.
When this is done, the tools will be available in this command prompt.

Wyświetl plik

@ -22,11 +22,11 @@ For this Getting Started we're going to use the Command Prompt, but after ESP-ID
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 ESP-IDF and ESP-IDF Tools must not be longer than 90 characters. Too long installation paths might result in a failed build.
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.
Limitations:
- The installation path of ESP-IDF and ESP-IDF Tools must not be longer than 90 characters. Too long installation paths might result in a failed build.
- The installation path of Python or ESP-IDF must not contain white spaces or parentheses.
- 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:

Wyświetl plik

@ -14,4 +14,5 @@ ESP-IDF V4.0 默认采用基于 CMake 的构建系统。
.. only:: esp32
如需使用针对 GNU Make 传统构建系统的 Eclipse IDE 开发环境,请前往 :doc:`快速入门(传统 GNU Make</get-started-legacy/index>`,查看 :doc:`Eclipse IDE 的创建和烧录指南(传统 GNU Make</get-started-legacy/eclipse-setup>`
如需使用针对 GNU Make 传统构建系统的 Eclipse IDE 开发环境,请前往 :doc:`快速入门(传统 GNU Make</get-started-legacy/index>`,查看 :doc:`Eclipse IDE 的创建和烧录指南(传统 GNU Make</get-started-legacy/eclipse-setup>`

Wyświetl plik

@ -57,6 +57,7 @@ macOS::
对于 macOS 用户:若你没有看到串口,请检查你是否已按照《入门指南》安装了适用于你特定开发板的 USB/串口驱动程序。对于 macOS High Sierra (10.13) 的用户,你可能还需要手动允许驱动程序的加载,具体可打开 ``系统偏好设置`` -> ``安全和隐私`` -> ``通用``,检查是否有信息显示:“来自开发人员的系统软件...”,其中开发人员的名称为 Silicon Labs 或 FTDI。
.. _linux-dialout-group:
在 Linux 中添加用户到 ``dialout``
@ -78,7 +79,6 @@ macOS::
现在,请使用串口终端程序,查看重置 {IDF_TARGET_NAME} 后终端上是否有输出,从而验证串口连接是否可用。
Windows 和 Linux 操作系统
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -103,12 +103,10 @@ Windows 和 Linux 操作系统
然后,请检查 {IDF_TARGET_NAME} 是否有打印日志。如有,请在终端打开串口进行查看。这里的日志内容取决于加载到 {IDF_TARGET_NAME} 的应用程序,请参考 `输出示例`_
.. 注解::
请在验证完串口通信正常后,关闭串口终端。如果您让终端一直保持打开的状态,之后上传固件时将无法访问串口。
macOS 操作系统
^^^^^^^^^^^^^^^^^
@ -140,7 +138,6 @@ macOS 提供了 **屏幕** 命令,因此您不用安装串口终端程序。
以下是 {IDF_TARGET_NAME} 的一个日志示例。如果没看到任何输出,请尝试重置开发板。
.. highlight:: none
::
@ -170,9 +167,6 @@ macOS 提供了 **屏幕** 命令,因此您不用安装串口终端程序。
在某些串口接线方式下,在 {IDF_TARGET_NAME} 启动并开始打印串口日志前,需要在终端程序中禁用串口 RTS DTR 管脚。该问题仅存在于将 RTS DTR 管脚直接连接到 EN GPIO0 管脚上的情况,绝大多数开发板(包括乐鑫所有的开发板)都没有这个问题。更多详细信息,请参考 `esptool 文档`_
如您在安装 {IDF_TARGET_NAME} 硬件开发的软件环境时,从 :ref:`get-started-connect` 跳转到了这里,请从 :ref:`get-started-configure` 继续阅读。
.. _esptool 文档: https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader
.. _esptool 文档: https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader

Wyświetl plik

@ -20,9 +20,9 @@
概述
============
.. only:: esp32
{IDF_TARGET_NAME} SoC 芯片支持以下功能:
ESP32 SoC 芯片支持以下功能:
.. only:: esp32
* 2.4 GHz Wi-Fi
* 蓝牙
@ -32,8 +32,6 @@
.. only:: esp32s2
ESP32-S2 SoC 芯片支持以下功能:
* 2.4 GHz Wi-Fi
* 高性能 Xtensa® 32 位 LX7 单核处理器
* 运行 RISC-V 或 FSM 内核的超低功耗协处理器
@ -43,8 +41,6 @@
.. only:: esp32s3
ESP32-S3 SoC 芯片支持以下功能:
* 2.4 GHz Wi-Fi
* 低功耗蓝牙
* 高性能 Xtensa® 32 位 LX7 双核处理器
@ -56,15 +52,16 @@
.. only:: esp32c3
ESP32-C3 SoC 芯片支持以下功能:
* 2.4 GHz Wi-Fi
* 低功耗蓝牙
* 高性能 32 位 RISC-V 单核处理器
* 多种外设
* 内置安全硬件
{IDF_TARGET_NAME} 采用 40 nm 工艺制成,具有最佳的功耗性能、射频性能、稳定性、通用性和可靠性,适用于各种应用场景和不同功耗需求。乐鑫为用户提供完整的软、硬件资源,进行 {IDF_TARGET_NAME} 硬件设备的开发。其中,乐鑫的软件开发环境 ESP-IDF 旨在协助用户快速开发物联网 (IoT) 应用,可满足用户对 Wi-Fi、蓝牙、低功耗等方面的要求。
{IDF_TARGET_NAME} 采用 40 nm 工艺制成,具有最佳的功耗性能、射频性能、稳定性、通用性和可靠性,适用于各种应用场景和不同功耗需求。
乐鑫为用户提供完整的软、硬件资源,进行 {IDF_TARGET_NAME} 硬件设备的开发。其中,乐鑫的软件开发环境 ESP-IDF 旨在协助用户快速开发物联网 (IoT) 应用,可满足用户对 Wi-Fi、蓝牙、低功耗等方面的要求。
准备工作
=============
@ -250,14 +247,14 @@ Windows 操作系统
.. code-block:: batch
cd %userprofile%\esp\esp-idf
install.bat
install.bat {IDF_TARGET_PATH_NAME}
或使用 Windows PowerShell
.. code-block:: powershell
cd ~/esp/esp-idf
./install.ps1
./install.ps1 {IDF_TARGET_PATH_NAME}
Linux 和 macOS 操作系统
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -265,7 +262,18 @@ Linux 和 macOS 操作系统
.. code-block:: bash
cd ~/esp/esp-idf
./install.sh
./install.sh {IDF_TARGET_PATH_NAME}
或使用 Fish shell
.. code-block:: fish
cd ~/esp/esp-idf
./install.fish {IDF_TARGET_PATH_NAME}
.. note::
通过一次性指定多个目标,可为多个目标芯片同时安装工具,如运行 ``./install.sh esp32,esp32c3,esp32s3``
通过运行 ``./install.sh````./install.sh all`` 可一次性为所有支持的目标芯片安装工具。
下载工具备选方案
~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -393,8 +401,6 @@ ESP-IDF 的 :idf:`examples` 目录下有一系列示例工程,都可以按照
ESP-IDF 编译系统不支持带有空格的路径。
.. _get-started-connect:
第六步:连接设备
@ -465,7 +471,6 @@ Windows 操作系统
.. _get-started-build:
第八步:编译工程
=========================

Wyświetl plik

@ -83,12 +83,10 @@
export PATH="$HOME/esp/{IDF_TARGET_TOOLCHAIN_PREFIX}/bin:$PATH"
.. 注解::
如果您已将 ``/bin/bash`` 设置为登录 shell且同时存在 ``.bash_profile````.profile`` 两个文件,则请更新 ``.bash_profile``。在 CentOS 环境下, ``alias`` 需要添加到 ``.bashrc`` 文件中。
退出并重新登录以使 ``.profile`` 的更改生效。运行以下命令来检查 ``PATH`` 设置是否正确::
printenv PATH
@ -100,7 +98,6 @@
注意这里的 ``/home/user-name`` 应该替换成您安装的主路径。
后续步骤
==========

Wyświetl plik

@ -35,13 +35,10 @@ Linux 平台工具链的标准设置
使用某些 Linux 版本向 {IDF_TARGET_NAME} 烧录固件时,可能会出现 ``Failed to open port /dev/ttyUSB0`` 错误消息。此时可以将用户添加至 :ref:`Linux Dialout 组<linux-dialout-group>`
修复 Ubuntu 16.04 损坏的 pip
兼容的 Python 版本
=================================
``python3-pip`` 包可能已损坏无法升级。需使用脚本 `get-pip.py <https://bootstrap.pypa.io/get-pip.py>`_ 手动删除并安装该包::
apt remove python3-pip python3-virtualenv; rm -r ~/.local
rm -r ~/.espressif/python_env && python get-pip.py
ESP-IDF 支持 Python 3.6 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources <https://www.python.org/downloads/>`_ 安装最新版 Python或使用 Python 管理系统如 `pyenv <https://github.com/pyenv/pyenv>`_ 对版本进行升级管理。
后续步骤
==========

Wyświetl plik

@ -79,9 +79,7 @@ MacPorts 需要完整的 XCode 软件,而 Homebrew 只需要安装 XCode 命
编译得到的工具链会被保存到 ``~/esp/ctng-volume/crosstool-NG/builds/{IDF_TARGET_TOOLCHAIN_PREFIX}``。使用工具链前,请将 ``~/esp/ctng-volume/crosstool-NG/builds/{IDF_TARGET_TOOLCHAIN_PREFIX}/bin`` 添加至 ``PATH`` 环境变量。
后续步骤
==========
请前往 :ref:`get-started-get-esp-idf` 章节继续设置开发环境。
请前往 :ref:`get-started-get-esp-idf` 章节继续设置开发环境。

Wyświetl plik

@ -62,11 +62,9 @@ ESP-IDF 将使用 macOS 上默认安装的 Python 版本。
请前往 :ref:`get-started-get-esp-idf` 章节继续设置开发环境。
.. _cmake: https://cmake.org/
.. _ninja: https://ninja-build.org/
.. _ccache: https://ccache.samba.org/
.. _homebrew: https://brew.sh/
.. _MacPorts: https://www.macports.org/install.php
.. _Catalina 10.15 发布说明: https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes

Wyświetl plik

@ -23,6 +23,4 @@
windows-setup-scratch
linux-setup-scratch
macos-setup-scratch
macos-setup-scratch

Wyświetl plik

@ -6,7 +6,6 @@ VS Code IDE 快速入门
我们支持 VS code并且致力于为所有与 ESP-IDF 相关的操作提供完善的端到端支持包括构建、烧录、监控、调试、追踪、core-dump、以及系统追踪查看器等操作。
快速安装指南
===============
@ -29,7 +28,6 @@ VS Code IDE 快速入门
* `Rainmaker Cloud <https://rainmaker.espressif.com/>`_:我们有内置的 Rainmaker Cloud 支持,您可以轻松编辑/读取连接的物联网设备的状态。
* **代码覆盖**:我们有内置的代码覆盖支持,将用颜色突出显示已经覆盖的行。我们也会在 IDE 内部直接渲染现有的 HTML 报告。
Bugs 问题 & 功能请求
=======================

Wyświetl plik

@ -72,7 +72,6 @@ Python 安装完成后,从 Windows 开始菜单中打开“命令提示符”
pip install --user pyserial
工具链设置
===============

Wyświetl plik

@ -17,8 +17,7 @@
install.ps1
该命令可下载并安装 ESP-IDF 所需的工具。如您已经安装了某个版本的工具,则该命令将无效。
该工具的下载安装位置由 ESP-IDF 工具安装器的设置决定,默认情况下为: ``C:\Users\username\.espressif``
该命令可下载并安装 ESP-IDF 所需的工具。如您已经安装了某个版本的工具,则该命令将无效。该工具的下载安装位置由 ESP-IDF 工具安装器的设置决定,默认情况下为: ``C:\Users\username\.espressif``
.. _get-started-export_bat-windows:

Wyświetl plik

@ -22,15 +22,15 @@ ESP-IDF 需要安装一些必备工具,才能围绕 {IDF_TARGET_NAME} 构建
较早 ESP-IDF 版本使用 :doc:`传统 GNU Make 构建系统<../get-started-legacy/windows-setup>` 和 MSYS2_ Unix 兼容环境。但如今已非必需,用户可直接通过 Windows 命令提示符使用 ESP-IDF。
.. note::
限定条件:请注意 ESP-IDF 和 ESP-IDF 工具的安装路径不能超过 90 个字符安装路径过长可能会导致构建失败。Python 或 ESP-IDF 的安装路径中一定不能包含空格或括号。与此同时,除非操作系统配置为支持 Unicode UTF-8否则 Python 或 ESP-IDF 的安装路径中也不能包括特殊字符(非 ASCII 码字符)
限定条件:
- 请注意 ESP-IDF 和 ESP-IDF 工具的安装路径不能超过 90 个字符,安装路径过长可能会导致构建失败。
- Python 或 ESP-IDF 的安装路径中一定不能包含空格或括号。
- 除非操作系统配置为支持 Unicode UTF-8否则 Python 或 ESP-IDF 的安装路径中也不能包括特殊字符(非 ASCII 码字符)
系统管理员可以通过如下方式将操作系统配置为支持 Unicode UTF-8控制面板-更改日期、时间或数字格式-管理选项卡-更改系统地域-勾选选项 “Beta使用 Unicode UTF-8 支持全球语言”-点击确定-重启电脑。
.. _get-started-windows-tools-installer:
ESP-IDF 工具安装器
=======================