mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
refactor(freertos): Make task snapshot debug API public
This commit makes the task snapshot related API public under the header freertos_debug.h.
This commit is contained in:
@@ -129,13 +129,25 @@ The following compatibility functions have been removed in ESP-IDF v6.0. These f
|
||||
|
||||
The function :cpp:func:`pxTaskGetStackStart` has been deprecated. Use :cpp:func:`xTaskGetStackStart` instead for improved type safety.
|
||||
|
||||
**API Added**
|
||||
|
||||
Task snapshot APIs have been made public due to their usage by external frameworks like ESP Insights. The APIs are now available through ``freertos/freertos_debug.h`` instead of the deprecated ``freertos/task_snapshot.h``.
|
||||
For safe usage with scheduler running, use ``vTaskSuspendAll()`` before calling snapshot functions and ``xTaskResumeAll()`` after.
|
||||
|
||||
**Memory Placement**
|
||||
|
||||
To reduce IRAM usage, the default placement for most FreeRTOS functions has been changed from IRAM to Flash. Consequently, the ``CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH`` option has been removed. This change saves a significant amount of IRAM but may have a slight performance impact. For performance-critical applications, the previous behavior can be restored by enabling the new :ref:`CONFIG_FREERTOS_IN_IRAM` option.
|
||||
- To reduce IRAM usage, the default placement for most FreeRTOS functions has been changed from IRAM to Flash. Consequently, the ``CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH`` option has been removed. This change saves a significant amount of IRAM but may have a slight performance impact. For performance-critical applications, the previous behavior can be restored by enabling the new :ref:`CONFIG_FREERTOS_IN_IRAM` option.
|
||||
- When deciding whether to enable ``CONFIG_FREERTOS_IN_IRAM``, consider conducting performance testing to measure the actual impact on your specific use case. Performance differences between Flash and IRAM configurations can vary depending on flash cache efficiency, API usage patterns, and system load.
|
||||
- A baseline performance test is provided in ``components/freertos/test_apps/freertos/performance/test_freertos_api_performance.c`` that measures the execution time of commonly used FreeRTOS APIs. This test can help you evaluate the performance impact of memory placement for your target hardware and application requirements.
|
||||
- Task snapshot functions are automatically placed in IRAM when ``CONFIG_ESP_PANIC_HANDLER_IRAM`` is enabled, ensuring they remain accessible during panic handling
|
||||
- ``vTaskGetSnapshot`` is kept in IRAM unless ``CONFIG_FREERTOS_PLACE_ISR_FUNCTIONS_INTO_FLASH`` is enabled, as it's used by the Task Watchdog interrupt handler.
|
||||
|
||||
When deciding whether to enable ``CONFIG_FREERTOS_IN_IRAM``, consider conducting performance testing to measure the actual impact on your specific use case. Performance differences between Flash and IRAM configurations can vary depending on flash cache efficiency, API usage patterns, and system load.
|
||||
**Removed Configuration Options:**
|
||||
|
||||
A baseline performance test is provided in ``components/freertos/test_apps/freertos/performance/test_freertos_api_performance.c`` that measures the execution time of commonly used FreeRTOS APIs. This test can help you evaluate the performance impact of memory placement for your target hardware and application requirements.
|
||||
The following hidden (and always true) configuration options have been removed:
|
||||
|
||||
- ``CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT``
|
||||
- ``CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH``
|
||||
|
||||
Ring Buffer
|
||||
-----------
|
||||
|
||||
Reference in New Issue
Block a user