docs(debugging): Add debug helpers API reference

This commit is contained in:
Krzysztof
2026-03-02 15:28:36 +08:00
parent 0f69e9d00e
commit 8ad2be7980
4 changed files with 36 additions and 9 deletions
+1
View File
@@ -236,6 +236,7 @@ INPUT = \
$(PROJECT_PATH)/components/esp_ringbuf/include/freertos/ringbuf.h \
$(PROJECT_PATH)/components/esp_rom/include/esp_rom_sys.h \
$(PROJECT_PATH)/components/esp_security/include/esp_ds.h \
$(PROJECT_PATH)/components/esp_system/include/esp_debug_helpers.h \
$(PROJECT_PATH)/components/esp_system/include/esp_expression_with_stack.h \
$(PROJECT_PATH)/components/esp_system/include/esp_freertos_hooks.h \
$(PROJECT_PATH)/components/esp_system/include/esp_ipc_isr.h \
@@ -213,6 +213,18 @@ To get the version at build time, additional version macros are provided. They c
#endif
Debug Helpers
-------------
The debug helper APIs in ``esp_debug_helpers.h`` provide utilities for run-time debugging and stack backtrace output.
- :cpp:func:`esp_backtrace_print` prints the current stack backtrace.
- :cpp:func:`esp_backtrace_print_all_tasks` prints backtraces for all tasks.
- :cpp:func:`esp_backtrace_get_start` and :cpp:func:`esp_backtrace_get_next_frame` allow manual iteration over backtrace frames.
These APIs are useful when diagnosing crashes, watchdog timeouts, or unexpected control flow.
.. _app-version:
App Version
@@ -237,4 +249,5 @@ API Reference
.. include-build-file:: inc/esp_mac.inc
.. include-build-file:: inc/esp_chip_info.inc
.. include-build-file:: inc/esp_cpu.inc
.. include-build-file:: inc/esp_debug_helpers.inc
.. include-build-file:: inc/esp_app_desc.inc
@@ -213,6 +213,18 @@ SDK 版本
#endif
调试辅助功能
-----------------
``esp_debug_helpers.h`` 中的调试辅助 API 提供了运行时调试和堆栈回溯输出相关功能。
- :cpp:func:`esp_backtrace_print` 用于打印当前堆栈回溯。
- :cpp:func:`esp_backtrace_print_all_tasks` 用于打印所有任务的堆栈回溯。
- :cpp:func:`esp_backtrace_get_start`:cpp:func:`esp_backtrace_get_next_frame` 用于手动遍历回溯帧。
这些 API 适用于诊断崩溃、看门狗超时或异常控制流等问题。
.. _app-version:
应用程序版本
@@ -237,4 +249,5 @@ API 参考
.. include-build-file:: inc/esp_mac.inc
.. include-build-file:: inc/esp_chip_info.inc
.. include-build-file:: inc/esp_cpu.inc
.. include-build-file:: inc/esp_debug_helpers.inc
.. include-build-file:: inc/esp_app_desc.inc