docs: Update CN for idf-monitor.rst

This commit is contained in:
renpeiying
2025-05-06 17:57:06 +08:00
committed by Peter Dragun
parent bb3655d6e7
commit f114a94369
2 changed files with 35 additions and 11 deletions

View File

@ -34,22 +34,22 @@ For easy interaction with IDF Monitor, use the keyboard shortcuts given in the t
-
* - * Ctrl + P
- Reset target into bootloader to pause app via RTS and DTR lines
- Resets the target into the bootloader using the RTS and DTR lines (if connected). This stops the board from executing the application, making it useful when waiting for another device to start. For additional details, refer to :ref:`target-reset-into-bootloader`.
- Reset the target into the bootloader using the RTS and DTR lines (if connected). This stops the board from executing the application, making it useful when waiting for another device to start. For additional details, refer to :ref:`target-reset-into-bootloader`.
* - * Ctrl + R
- Reset target board via RTS
- Resets the target board and re-starts the application via the RTS line (if connected).
- Reset the target board and re-starts the application via the RTS line (if connected).
* - * Ctrl + F
- Build and flash the project
- Pauses idf_monitor to run the project ``flash`` target, then resumes idf_monitor. Any changed source files are recompiled and then re-flashed. Target ``encrypted-flash`` is run if idf_monitor was started with argument ``-E``.
- Pause idf_monitor to run the project ``flash`` target, then resumes idf_monitor. Any changed source files are recompiled and then re-flashed. Target ``encrypted-flash`` is run if idf_monitor was started with argument ``-E``.
* - * Ctrl + A (or A)
- Build and flash the app only
- Pauses idf_monitor to run the ``app-flash`` target, then resumes idf_monitor. Similar to the ``flash`` target, but only the main app is built and re-flashed. Target ``encrypted-app-flash`` is run if idf_monitor was started with argument ``-E``.
- Pause idf_monitor to run the ``app-flash`` target, then resumes idf_monitor. Similar to the ``flash`` target, but only the main app is built and re-flashed. Target ``encrypted-app-flash`` is run if idf_monitor was started with argument ``-E``.
* - * Ctrl + Y
- Stop/resume log output printing on screen
- Discards all incoming serial data while activated. Allows to quickly pause and examine log output without quitting the monitor.
- Discard all incoming serial data while activated. Allows to quickly pause and examine log output without quitting the monitor.
* - * Ctrl + L
- Stop/resume log output saved to file
- Creates a file in the project directory and the output is written to that file until this is disabled with the same keyboard shortcut (or IDF Monitor exits).
- Create a file in the project directory and the output is written to that file until this is disabled with the same keyboard shortcut (or IDF Monitor exits).
* - * Ctrl + I (or I)
- Stop/resume printing timestamps
- IDF Monitor can print a timestamp in the beginning of each line. The timestamp format can be changed by the ``--timestamp-format`` command line argument.
@ -61,7 +61,7 @@ For easy interaction with IDF Monitor, use the keyboard shortcuts given in the t
-
* - Ctrl + C
- Interrupt running application
- Pauses IDF Monitor and runs GDB_ project debugger to debug the application at runtime. This requires :ref:`CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME` option to be enabled.
- Pause IDF Monitor and runs GDB_ project debugger to debug the application at runtime. This requires :ref:`CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME` option to be enabled.
Any keys pressed, other than ``Ctrl-]`` and ``Ctrl-T``, will be sent through the serial port.
@ -69,11 +69,12 @@ Any keys pressed, other than ``Ctrl-]`` and ``Ctrl-T``, will be sent through the
Automatic Coloring
==================
IDF Monitor automatically colors the output based on the log level. This feature reduces the number of bytes transferred over the serial console by avoiding redundant log formatting, which can improve performance by reducing latency in log transmission.
Other benefits include adding colors to precompiled libraries (such as Wi-Fi) and reduced binary size of the application.
IDF Monitor automatically colors the output based on the log level. This feature reduces the number of bytes transferred over the serial console by avoiding redundant log formatting, which can improve performance by reducing latency in log transmission. Other benefits include adding colors to precompiled libraries (such as Wi-Fi) and reduced binary size of the application.
The automatic coloring is enabled by default. To disable it, use the command line option ``--disable-auto-color``.
The coloring is done based on the log level followed by optional timestamp and tag. For option to enable coloring on the {IDF_TARGET_NAME} side, see :ref:`CONFIG_LOG_COLORS`.
For more details on the log, see :doc:`Logging <../../api-reference/system/log>`.
.. note::
@ -367,6 +368,7 @@ Known Issues with IDF Monitor
The following issues are currently known:
- Autocoloring cannot detect the log level if the message contains new lines. In this case, the IDF Monitor will only color the first line of the message.
To work around this issue, enable :ref:`CONFIG_LOG_COLORS` in menuconfig. Please note that this might have some impact on binary size and performance.
If you experience any other issues while using IDF Monitor, check our `GitHub repository <https://github.com/espressif/esp-idf-monitor/issues>`_ for a list of known issues and their current status. If you come across a problem that hasn't been documented yet, we encourage you to create a new issue report.

View File

@ -66,6 +66,22 @@ IDF 监视器是一个串行终端程序,使用了 esp-idf-monitor_ 包,用
除了 ``Ctrl-]````Ctrl-T``,其他快捷键信号会通过串口发送到目标设备。
自动着色
==========
IDF 监视器会根据日志级别自动为输出内容进行着色。该功能通过避免冗余的日志格式化,减少了通过串口控制台传输的字节数,降低了日志传输的延迟,提升了性能。该功能还具有其他优势,能够为预编译库(例如 Wi-Fi添加颜色以及减少应用程序的二进制文件大小。
该功能默认启用。如需禁用,请使用命令行选项 ``--disable-auto-color``
着色是基于日志级别进行的,日志级别后可选择是否显示时间戳和标签。如需在 {IDF_TARGET_NAME} 端启用着色,参见 :ref:`CONFIG_LOG_COLORS`
有关日志的更多信息,参见 :doc:`日志记录 <../../api-reference/system/log>`
.. note::
如果日志消息中包含换行符自动着色可能无法正常工作。在这种情况下IDF 监视器仅会为消息的第一行着色。
兼具 ESP-IDF 特性
=========================
@ -349,7 +365,13 @@ GDBStub 支持在运行时进行调试。GDBStub 在目标上运行,并通过
IDF 监视器已知问题
=================================
如果在使用 IDF 监视器过程中遇到任何问题,请查看 `GitHub 仓库 <https://github.com/espressif/esp-idf-monitor/issues>`_ 以获取已知问题列表及其当前状态。如果遇到的问题没有相关记录,请创建一个新的问题报告。
目前已知问题如下:
- 消息中包含换行符时自动着色无法检测日志级别。在这种情况下IDF Monitor 只会为消息的第一行着色。
为了避免这个问题,可以在 menuconfig 中启用 :ref:`CONFIG_LOG_COLORS`。注意,这可能会对二进制文件的大小和性能产生一定影响。
如果在使用 IDF 监视器过程中遇到问题,可以访问 `IDF 监视器的 GitHub 仓库 <https://github.com/espressif/esp-idf-monitor/issues>`_ 查看已知问题及其当前状态。如果遇到的问题没有相关记录,可以提交一个新的问题报告。
.. _esp-idf-monitor: https://github.com/espressif/esp-idf-monitor
.. _IDF 监视器文档: https://github.com/espressif/esp-idf-monitor/blob/v1.5.0/README.md#documentation