Просмотр исходного кода

docs: add debugging freertos objects

Alexey Lapshin 3 лет назад
Родитель
Сommit
42a22f149a

+ 29 - 4
docs/en/api-guides/jtag-debugging/debugging-examples.rst

@@ -245,6 +245,7 @@ Examples in this section
 5. :ref:`jtag-debugging-examples-command-line-05`
 6. :ref:`jtag-debugging-examples-command-line-06`
 7. :ref:`jtag-debugging-examples-command-line-07`
+8. :ref:`jtag-debugging-examples-command-line-08`
 
 
 .. _jtag-debugging-examples-command-line-01:
@@ -445,10 +446,6 @@ To check it delete all breakpoints and enter ``c`` to resume application. Then e
 
 In particular case above, the application has been halted in line 52 of code in file ``freertos_hooks.c``. Now you can resume it again by enter ``c`` or do some debugging as discussed below.
 
-.. note::
-
-    In MSYS2 shell Ctrl+C does not halt the target but exists debugger. To resolve this issue consider debugging with :ref:`jtag-debugging-examples-eclipse` or check a workaround under http://www.mingw.org/wiki/Workaround_for_GDB_Ctrl_C_Interrupt.
-
 
 .. _jtag-debugging-examples-command-line-04:
 
@@ -627,6 +624,34 @@ If current value of ``i`` is less than ``2`` and program is resumed, it will bli
     (gdb)
 
 
+.. _jtag-debugging-examples-command-line-08:
+
+Debugging FreeRTOS Objects
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This part might be interesting when you are debugging FreeRTOS tasks interactions.
+Users that need to use the FreeRTOS task interactions can use the GDB ``freertos`` command. The ``freertos`` command is not native to GDB and comes from the `freertos-gdb <https://pypi.org/project/freertos-gdb>`_ Python extension module. The ``freertos`` command contains a series of sub-commands as demonstrated in the code snippet::
+
+    (gdb) freertos
+    "freertos" must be followed by the name of a subcommand.
+    List of freertos subcommands:
+
+    freertos queue --  Generate a print out of the current queues info.
+    freertos semaphore --  Generate a print out of the current semaphores info.
+    freertos task --  Generate a print out of the current tasks and their states.
+    freertos timer --  Generate a print out of the current timers info.
+
+For a more detailed description of this extension, please refer to https://pypi.org/project/freertos-gdb.
+
+.. note::
+
+    The freertos-gdb Python module is included as a Python package requirement by ESP-IDF, thus should be automatically installed (see :ref:`get-started-set-up-tools` for more details).
+
+    The FreeRTOS extension automatically loads in case GDB is executed with command via ``idf.py gdb``. Otherwise, the module could be enabled via the ``python import freertos_gdb`` command inside GDB.
+
+    Users only need to have Python 3.6 (or above) that contains a Python shared library.
+
+
 Obtaining help on commands
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 

+ 5 - 0
docs/en/api-guides/jtag-debugging/index.rst

@@ -249,6 +249,11 @@ This section is intended for users not familiar with GDB. It presents example de
 
 Similar debugging actions are provided using GDB from :ref:`jtag-debugging-examples-command-line`.
 
+.. note::
+
+    :ref:`jtag-debugging-examples-command-line-08` is currently only available for command line debugging.
+
+
 Before proceeding to examples, set up your {IDF_TARGET_NAME} target and load it with :example:`get-started/blink`.
 
 

+ 2 - 0
docs/en/api-guides/jtag-debugging/tips-and-quirks.rst

@@ -71,6 +71,8 @@ FreeRTOS support
 
 OpenOCD has explicit support for the ESP-IDF FreeRTOS. GDB can see FreeRTOS tasks as threads. Viewing them all can be done using the GDB ``i threads`` command, changing to a certain task is done with ``thread n``, with ``n`` being the number of the thread. FreeRTOS detection can be disabled in target's configuration. For more details see :ref:`jtag-debugging-tip-openocd-configure-target`.
 
+GDB has a Python extension for FreeRTOS support. ESP-IDF automatically loads this module into GDB with the ``idf.py gdb`` command when the system requirements are met. See more details in :ref:`jtag-debugging-examples-command-line-08`.
+
 .. only:: esp32
 
     .. _jtag-debugging-tip-code-flash-voltage:

+ 0 - 4
docs/zh_CN/api-guides/jtag-debugging/debugging-examples.rst

@@ -445,10 +445,6 @@
 
 在上图所示的情况下,应用程序已经在 ``freertos_hooks.c`` 文件的第 52 行暂停运行,现在您可以通过输入 ``c`` 再次将其恢复运行或者进行如下所述的一些调试工作。
 
-.. note::
-
-	在 MSYS2 的 shell 中输入 Ctrl+C 并不会暂停目标的运行,而是会退出调试器。解决这个问题的方法可以通过 :ref:`使用 Eclipse 来调试 <jtag-debugging-examples-eclipse>` 或者参考 http://www.mingw.org/wiki/Workaround_for_GDB_Ctrl_C_Interrupt 里的解决方案。
-
 
 .. _jtag-debugging-examples-command-line-04: