refactor(freertos): Remove option for Task Snapshot
Previously, Task Snapshot could be conditionally built based on the CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT option. However, there is no overhead with always enabling Task Snapshot functions, as the linker will remove any functions if they are not called. This commit... - removes all ESP-IDF dependencies on the CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT option so that Task Snapshot functions are always available. - Makes CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT a hidden option to maintain compatibility with user code. - adds documentation regarding Task Snapshot.
This commit is contained in:
@@ -16,6 +16,8 @@ ESP-IDF adds various new features to supplement the capabilities of FreeRTOS as
|
||||
- **Ring buffers**: Ring buffers provide a FIFO buffer that can accept entries of arbitrary lengths.
|
||||
- **ESP-IDF Tick and Idle Hooks**: ESP-IDF provides multiple custom tick interrupt hooks and idle task hooks that are more numerous and more flexible when compared to FreeRTOS tick and idle hooks.
|
||||
- **Thread Local Storage Pointer (TLSP) Deletion Callbacks**: TLSP Deletion callbacks are run automatically when a task is deleted, thus allowing users to clean up their TLSPs automatically.
|
||||
- **Task Snapshots**: These functions are used by post-mortem debugging features (e.g., core dump) to get a snapshot of each FreeRTOS task.
|
||||
- **IDF Additional API**: ESP-IDF specific functions added to augment the features of FreeRTOS.
|
||||
- **Component Specific Properties**: Currently added only one component specific property ``ORIG_INCLUDE_PATH``.
|
||||
|
||||
|
||||
@@ -256,7 +258,7 @@ Allow-Split buffers will attempt to **split the item into two parts** when the f
|
||||
Referring to the diagram above, the 16 bytes of free space at the tail of the buffer is insufficient to store the 28 byte item. Therefore, the item is split into two parts (8 and 20 bytes) and written as two parts to the buffer.
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
Allow-Split buffers treat both parts of the split item as two separate items, therefore call :cpp:func:`xRingbufferReceiveSplit` instead of :cpp:func:`xRingbufferReceive` to receive both parts of a split item in a thread safe manner.
|
||||
|
||||
.. packetdiag:: ../../../_static/diagrams/ring-buffer/ring_buffer_wrap_byte_buf.diag
|
||||
@@ -434,7 +436,21 @@ When implementing TLSP callbacks, users should note the following:
|
||||
- The callback **must never attempt to block or yield** and critical sections should be kept as short as possible
|
||||
- The callback is called shortly before a deleted task's memory is freed. Thus, the callback can either be called from :cpp:func:`vTaskDelete` itself, or from the idle task.
|
||||
|
||||
.. ----------------------------------------------- ESP-IDF Additional API --------------------------------------------------
|
||||
.. -------------------------------------------------- Task Snapshot ----------------------------------------------------
|
||||
|
||||
Task Snapshot
|
||||
-------------
|
||||
|
||||
The Task Snapshot functions provide port-mortem debugging features (e.g., core dump) via a simple API to get a snapshot of all current tasks in the system. Each task snapshot includes information such as:
|
||||
|
||||
- A pointer to the task's Task Control Block (TCB) structure
|
||||
- The top of the task's stack (i.e., current stack pointer)
|
||||
|
||||
.. warning::
|
||||
|
||||
Task Snapshot must only be called when FreeRTOS is no longer running, such as after the system has crashed.
|
||||
|
||||
.. --------------------------------------------- ESP-IDF Additional API ------------------------------------------------
|
||||
|
||||
.. _freertos-idf-additional-api:
|
||||
|
||||
@@ -468,6 +484,11 @@ Hooks API
|
||||
|
||||
.. include-build-file:: inc/esp_freertos_hooks.inc
|
||||
|
||||
Task Snapshot API
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. include-build-file:: inc/task_snapshot.inc
|
||||
|
||||
Additional API
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user