docs: Update CN translation for idf-py.rst

This commit is contained in:
Zhang Shuxian
2026-06-25 09:13:50 +02:00
committed by Marek Fiala
parent 20e426ccfe
commit 82e560b18c
2 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -334,9 +334,9 @@ The MCP server provides the following tools:
- ``set target``: Set the ESP-IDF target (esp32, esp32s3, esp32c6, etc.)
- ``build project``: Build the ESP-IDF project with the current target
- ``flash project``: Flash the built project to a connected device. Specify it by port name.
- ``flash project``: Flash the built project to a connected device. Specify it by port name
- ``clean project``: Clean build artifacts
- ``create project``: Create a new ESP-IDF project from the sample template. Can be used before any project exists.
- ``create project``: Create a new ESP-IDF project from the sample template. Can be used before any project exists
All tools accept an optional ``project_dir`` argument. When omitted, the tool operates on the directory configured at startup (``-C`` flag or ``IDF_MCP_WORKSPACE_FOLDER``). You can instruct the AI model to use a specific project directory explicitly, for example when working with multiple projects or when no default project was configured at startup.
+6 -3
View File
@@ -317,7 +317,7 @@ ESP-IDF 的 MCP(Model Context Protocol,模型上下文协议)服务器可
eim run "idf.py mcp-server"
2. 直接使用 ``idf.py``:在已激活 ESP-IDF 环境的 shell 中运行 ``idf.py mcp-server`` 命令启动 MCP 服务器。必须在有效的 ESP-IDF 项目目录中执行该命令,或者使用 ``idf.py -C <project_dir> mcp-server`` 指定项目路径。
2. 直接使用 ``idf.py``:在已激活 ESP-IDF 环境的 shell 中运行 ``idf.py mcp-server`` 命令启动 MCP 服务器。该服务器可以在任何目录下启动。使用 ``idf.py -C <project_dir> mcp-server`` 或设置 ``IDF_MCP_WORKSPACE_FOLDER`` 环境变量来配置默认项目。如果在启动时未配置任何项目,则在每次调用工具时显式传递项目目录。
.. code-block:: bash
@@ -330,12 +330,15 @@ ESP-IDF 的 MCP(Model Context Protocol,模型上下文协议)服务器可
可用工具与资源
^^^^^^^^^^^^^^
MCP 服务器提供以下可用的命令:
MCP 服务器提供以下工具:
- ``set target``:设置 ESP-IDF 的目标芯片(esp32,esp32s3,esp32c6 等)
- ``build project``:使用当前目标构建 ESP-IDF 项目
- ``flash project``:将已构建的项目烧录到已连接的设备,通过端口名称进行指定。
- ``flash project``:将已构建的项目烧录到已连接的设备,通过端口名称进行指定
- ``clean project``:清理构建产物
- ``create project``:基于示例模板创建新的 ESP-IDF 项目,可在尚无项目时使用
所有工具都接受可选的 ``project_dir`` 参数。当省略该参数时,工具将默认使用启动时配置的目录(该目录可通过 ``-C`` 参数或 ``IDF_MCP_WORKSPACE_FOLDER`` 环境变量指定)。你可以要求 AI 模型明确指定某个项目目录,例如当同时处理多个项目,或启动时未配置默认项目的情况下。
同时提供以下资源: