kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'docs/add_translation_for_7637' into 'master'
Add translation for the update in 7637 and 8095 See merge request espressif/esp-idf!8059pull/5052/head
commit
82e2b4a0d4
|
@ -383,7 +383,8 @@ You can setup environment to build documentation locally on your PC by installin
|
|||
6. Blockdiag - http://blockdiag.com/en/index.html
|
||||
7. Recommonmark - https://github.com/rtfd/recommonmark
|
||||
|
||||
The package "sphinx_idf_theme" is added to have the same "look and feel" of `ESP32 Programming Guide <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/index.html>`_.
|
||||
|
||||
The package "sphinx_idf_theme" is added to have the same "look and feel" of `ESP-IDF Programming Guide <https://docs.espressif.com/projects/esp-idf/en/latest/index.html>`_.
|
||||
|
||||
Do not worry about being confronted with several packages to install. Besides Doxygen and sphinx_idf_theme, all remaining packages are written in pure Python. Therefore installation of all of them is combined into one simple step.
|
||||
|
||||
|
@ -437,9 +438,10 @@ Installation of Doxygen is OS dependent:
|
|||
sphinx_idf_theme
|
||||
@@@@@@@@@@@@@@@@
|
||||
|
||||
The ``sphinx_idf_theme`` needs a mixture of Python and JavaScript in order to build. So currently it's necessary install `node.js <https://nodejs.org/en/download/>` in order to build it locally.
|
||||
The ``sphinx_idf_theme`` needs a mixture of Python and JavaScript in order to build. So currently it's necessary install `node.js <https://nodejs.org/en/download/>`_ in order to build it locally.
|
||||
|
||||
::
|
||||
|
||||
cd ~/esp
|
||||
git clone https://github.com/espressif/sphinx_idf_theme.git
|
||||
cd sphinx_idf_theme
|
||||
|
|
|
@ -793,35 +793,35 @@ Flash 参数
|
|||
|
||||
.. _selecting-idf-target:
|
||||
|
||||
Selecting the Target
|
||||
选择“目标”芯片
|
||||
====================
|
||||
|
||||
ESP-IDF supports multiple targets (chips). The identifiers used for each chip are as follows:
|
||||
ESP-IDF 支持多款芯片,它们通过在软件中使用不同的 “目标” (target) 名进行区分,具体对应关系如下:
|
||||
|
||||
* ``esp32`` — for ESP32-D0WD, ESP32-D2WD, ESP32-S0WD (ESP-SOLO), ESP32-U4WDH, ESP32-PICO-D4
|
||||
* ``esp32s2``— for ESP32-S2
|
||||
* ``esp32`` — 适用于 ESP32-D0WD、ESP32-D2WD、ESP32-S0WD (ESP-SOLO)、ESP32-U4WDH、ESP32-PICO-D4
|
||||
* ``esp32s2``— 适用于 ESP32-S2
|
||||
|
||||
To select the target before building the project, use ``idf.py set-target <target>`` command, for example::
|
||||
在构建项目前,请首先根据您的芯片选择正确的软件目标,具体命令为 ``idf.py set-target <target>``。举例 ::
|
||||
|
||||
idf.py set-target esp32s2
|
||||
|
||||
.. important::
|
||||
|
||||
``idf.py set-target`` will clear the build directory and re-generate the ``sdkconfig`` file from scratch. The old ``sdkconfig`` file will be saved as ``sdkconfig.old``.
|
||||
运行 ``idf.py set-target`` 命令将清除 ``build`` 文件夹的内容,并重新生成一个 ``sdkconfig`` 文件。之前的 ``sdkconfig`` 将另存为 ``sdkconfig.old``。
|
||||
|
||||
.. note::
|
||||
|
||||
The behavior of ``idf.py set-target`` command is equivalent to:
|
||||
运行 ``idf.py set-target`` 命令相当于分别运行以下几个命令:
|
||||
|
||||
1. clearing the build directory (``idf.py fullclean``)
|
||||
2. removing the sdkconfig file (``mv sdkconfig sdkconfig.old``)
|
||||
3. configuring the project with the new target (``idf.py -DIDF_TARGET=esp32 reconfigure``)
|
||||
1. 清除 ``build`` 文件夹 (``idf.py fullclean``)
|
||||
2. 移除 ``sdkconfig`` 文件 (``mv sdkconfig sdkconfig.old``)
|
||||
3. 根据选择的“目标”芯片配置项目 (``idf.py -DIDF_TARGET=esp32 reconfigure``)
|
||||
|
||||
It is also possible to pass the desired ``IDF_TARGET`` as an environement variable (e.g. ``export IDF_TARGET=esp32s2``) or as a CMake variable (e.g. ``-DIDF_TARGET=esp32s2`` argument to CMake or idf.py). Setting the environment variable is a convenient method if you mostly work with one type of the chip.
|
||||
您也可以将要用的 ``IDF_TARGET`` 设置为环境变量,比如:export IDF_TARGET=esp32s2;或设置为 CMake 变量,比如将 ``-DIDF_TARGET=esp32s2`` 以参数形式传递给 CMake 或 idf.py。如果您大多数时间仅使用一款芯片,则将 ``IDF_TARGET`` 配置为环境变量比较方便。
|
||||
|
||||
To specify the _default_ value of ``IDF_TARGET`` for a given project, add ``CONFIG_IDF_TARGET`` value to ``sdkconfig.defaults``. For example, ``CONFIG_IDF_TARGET="esp32s2"``. This value will be used if ``IDF_TARGET`` is not specified by other method: using an environment variable, CMake variable, or ``idf.py set-target`` command.
|
||||
对于特定项目,您可以使用以下方式为 ``IDF_TARGET`` 配置 _default_ 值:把 ``CONFIG_IDF_TARGET`` 的值加入 ``sdkconfig.defaults``。举例而言,配置 ``CONFIG_IDF_TARGET="esp32s2"``。这样一来,除非特别设置(比如使用环境变量、CMake 变量或 ``idf.py set-target`` 命令),否则 ``IDF_TARGET`` 将默认采用 ``CONFIG_IDF_TARGET``。
|
||||
|
||||
If the target has not been set by any of these methods, the build system will default to ``esp32`` target.
|
||||
如果您从未通过以上述任何方式配置过“目标”芯片,则构建系统会默认将 ``esp32`` 设定为“目标”芯片。
|
||||
|
||||
.. _write-pure-component:
|
||||
|
||||
|
|
|
@ -278,14 +278,14 @@ Sphinx 新手怎么办
|
|||
1. Doxygen - http://doxygen.nl/
|
||||
2. Sphinx - https://github.com/sphinx-doc/sphinx/#readme-for-sphinx
|
||||
3. Breathe - https://github.com/michaeljones/breathe#breathe
|
||||
4. Document theme "sphinx_rtd_theme" - https://github.com/rtfd/sphinx_rtd_theme
|
||||
4. Document theme "sphinx_idf_theme" - https://github.com/rtfd/sphinx_idf_theme
|
||||
5. Custom 404 page "sphinx-notfound-page" - https://github.com/rtfd/sphinx-notfound-page
|
||||
6. Blockdiag - http://blockdiag.com/en/index.html
|
||||
7. Recommonmark - https://github.com/rtfd/recommonmark
|
||||
|
||||
添加 "sphinx_rtd_theme" 包之后,文档将与 `ESP32 编程指南 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/index.html>`_ 的风格保持一致,与 "Read the Docs" 网站的显示效果一样.
|
||||
添加 "sphinx_idf_theme" 包之后,文档将与 `ESP-IDF 编程指南 <https://docs.espressif.com/projects/esp-idf/en/latest/index.html>`_ 的风格保持一致。
|
||||
|
||||
不用担心需要安装太多包。除 Doxygen 之外,其他包均使用 Python 语言,可一键安装。
|
||||
不用担心需要安装太多包。除 Doxygen 和 sphinx_idf_theme 之外,其他包均使用纯 Python 语言,可一键安装。
|
||||
|
||||
Doxygen 的安装取决于操作系统:
|
||||
|
||||
|
@ -327,7 +327,24 @@ Doxygen 的安装取决于操作系统:
|
|||
|
||||
查看屏幕上的记录,确定 ``mingw-w64-i686-python-pillow-4.3.0-1`` 已安装。旧版本 *pillow* 无法运行。
|
||||
|
||||
Windows 安装 Doxygen 的缺点是 `blockdiag pictures <add-illustrations>` 字体不能正确加载,可能会存在乱码。在此问题解决之前,您可以使用 `interactive shell`_ 查看完整图片。
|
||||
Windows 安装 Doxygen 的缺点是 `blockdiag pictures <add-illustrations>`_ 字体不能正确加载,可能会存在乱码。在此问题解决之前,您可以使用 `interactive shell`_ 查看完整图片。
|
||||
|
||||
|
||||
sphinx_idf_theme
|
||||
@@@@@@@@@@@@@@@@
|
||||
|
||||
编译 ``sphinx_idf_theme`` 需要同时使用 Python 和 JavaScript。因此,目前要进行本地编译还必须安装 `node.js <https://nodejs.org/en/download/>`_ ,命令如下:
|
||||
|
||||
::
|
||||
|
||||
cd ~/esp
|
||||
git clone https://github.com/espressif/sphinx_idf_theme.git
|
||||
cd sphinx_idf_theme
|
||||
npm install
|
||||
python setup.py build
|
||||
python setup.py install
|
||||
|
||||
我们计划在不久的将来支持安装预编译 ``sphinx_idf_theme``,给您带来的暂时不便,敬请谅解。
|
||||
|
||||
其他所有应用都是 `Python <https://www.python.org/>`_ 包,可以按照下列步骤一键安装:
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ Windows 操作系统
|
|||
cd %userprofile%\esp\hello_world
|
||||
idf.py menuconfig
|
||||
|
||||
Setting the target with ``idf.py set-target {IDF_TARGET}`` should be done once, after opening a new project. If the project contains some existing builds and configuration, they will be cleared and initialized. The target may be saved in environment variable to skip this step at all. See :ref:`selecting-idf-target` for additional information.
|
||||
打开一个新项目后,应首先设置“目标”芯片 ``idf.py set-target {IDF_TARGET}``。注意,此操作将清除并初始化项目之前的编译和配置(如有)。 您也可以直接将“目标”配置为环境变量(此时可跳过该步骤)。更多信息,请见 :ref:`selecting-idf-target`。
|
||||
|
||||
如果之前的步骤都正确,则会显示下面的菜单:
|
||||
|
||||
|
@ -447,9 +447,9 @@ Setting the target with ``idf.py set-target {IDF_TARGET}`` should be done once,
|
|||
.. _get-started-build-monitor:
|
||||
|
||||
第十步:监视器
|
||||
======================
|
||||
===============
|
||||
|
||||
您可以使用 ``make monitor`` 命令,监视 “hello_world” 的运行情况。注意,不要忘记将 PORT 替换为您的串口名称。
|
||||
您可以使用 ``idf.py -p PORT monitor`` 命令,监视 “hello_world” 的运行情况。注意,不要忘记将 PORT 替换为您的串口名称。
|
||||
|
||||
运行该命令后,:doc:`IDF 监视器 <../api-guides/tools/idf-monitor>` 应用程序将启动:::
|
||||
|
||||
|
|
|
@ -2,7 +2,18 @@ ESP-IDF 编程指南
|
|||
=========================
|
||||
:link_to_translation:`en:[English]`
|
||||
|
||||
这里是乐鑫 IoT 开发框架 (`esp-idf <https://github.com/espressif/esp-idf>`_) 的文档中心。ESP-IDF 是 `ESP32 <https://www.espressif.com/zh-hans/products/hardware/esp32/overview>`_ 芯片的官方开发框架。
|
||||
这里是乐鑫 IoT 开发框架 (`esp-idf <https://github.com/espressif/esp-idf>`_) 的文档中心。ESP-IDF 是 `ESP32 和 ESP32-S2 <https://www.espressif.com/en/products/hardware/socs>`_ 系列芯片的官方开发框架。
|
||||
|
||||
.. only:: html
|
||||
|
||||
本文档仅包含针对 {IDF_TARGET_NAME} 芯片的 ESP-IDF 使用。如需了解其他芯片,请点击页面左下方的 "Switch Version"。
|
||||
|
||||
.. only:: latex
|
||||
|
||||
本文档仅包含针对 {IDF_TARGET_NAME} 芯片的 ESP-IDF 使用。
|
||||
|
||||
|
||||
ESP-IDF 是 `ESP32 <https://www.espressif.com/zh-hans/products/hardware/esp32/overview>`_ 芯片的官方开发框架。
|
||||
|
||||
================== ================== ==================
|
||||
|快速入门|_ |API 参考|_ |H/W 参考|_
|
||||
|
|
Ładowanie…
Reference in New Issue