forked from espressif/esp-idf
Merge branch 'docs/freertos_docs_for_p4' into 'master'
docs(freertos): Updated FreeRTOS documentation for ESP32-P4 Closes IDF-7760 See merge request espressif/esp-idf!25550
This commit is contained in:
@@ -1351,9 +1351,6 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
|
|||||||
#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) \
|
#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) \
|
||||||
xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
|
xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
|
||||||
|
|
||||||
/** @cond !DOC_EXCLUDE_HEADER_SECTION */
|
|
||||||
/**@{*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cond !DOC_EXCLUDE_HEADER_SECTION
|
* @cond !DOC_EXCLUDE_HEADER_SECTION
|
||||||
* queue. h
|
* queue. h
|
||||||
|
@@ -173,13 +173,11 @@ api-reference/system/async_memcpy.rst
|
|||||||
api-reference/system/random.rst
|
api-reference/system/random.rst
|
||||||
api-reference/system/esp_timer.rst
|
api-reference/system/esp_timer.rst
|
||||||
api-reference/system/esp_event.rst
|
api-reference/system/esp_event.rst
|
||||||
api-reference/system/freertos.rst
|
|
||||||
api-reference/system/system_time.rst
|
api-reference/system/system_time.rst
|
||||||
api-reference/system/log.rst
|
api-reference/system/log.rst
|
||||||
api-reference/system/soc_caps.rst
|
api-reference/system/soc_caps.rst
|
||||||
api-reference/system/internal-unstable.rst
|
api-reference/system/internal-unstable.rst
|
||||||
api-reference/system/app_image_format.rst
|
api-reference/system/app_image_format.rst
|
||||||
api-reference/system/freertos_additions.rst
|
|
||||||
api-reference/system/himem.rst
|
api-reference/system/himem.rst
|
||||||
api-reference/system/power_management.rst
|
api-reference/system/power_management.rst
|
||||||
api-reference/system/mem_alloc.rst
|
api-reference/system/mem_alloc.rst
|
||||||
@@ -196,7 +194,6 @@ api-reference/system/ipc.rst
|
|||||||
api-reference/system/esp_https_ota.rst
|
api-reference/system/esp_https_ota.rst
|
||||||
api-reference/system/ulp-risc-v.rst
|
api-reference/system/ulp-risc-v.rst
|
||||||
api-reference/system/esp_err.rst
|
api-reference/system/esp_err.rst
|
||||||
api-reference/system/freertos_idf.rst
|
|
||||||
api-reference/system/console.rst
|
api-reference/system/console.rst
|
||||||
api-reference/system/intr_alloc.rst
|
api-reference/system/intr_alloc.rst
|
||||||
api-reference/system/index.rst
|
api-reference/system/index.rst
|
||||||
|
@@ -44,6 +44,8 @@ POSIX/Linux Simulator Approach
|
|||||||
|
|
||||||
The `FreeRTOS POSIX/Linux simulator <https://www.freertos.org/FreeRTOS-simulator-for-Linux.html>`_ is available on ESP-IDF as a preview target already. This simulator allows ESP-IDF components to be implemented on the host, making them accessible to ESP-IDF applications when running on host. Currently, only a limited number of components are ready to be built on Linux. Furthermore, the functionality of each component ported to Linux may also be limited or different compared to the functionality when building that component for a chip target. For more information about whether the desired components are supported on Linux, please refer to :ref:`component-linux-mock-support`.
|
The `FreeRTOS POSIX/Linux simulator <https://www.freertos.org/FreeRTOS-simulator-for-Linux.html>`_ is available on ESP-IDF as a preview target already. This simulator allows ESP-IDF components to be implemented on the host, making them accessible to ESP-IDF applications when running on host. Currently, only a limited number of components are ready to be built on Linux. Furthermore, the functionality of each component ported to Linux may also be limited or different compared to the functionality when building that component for a chip target. For more information about whether the desired components are supported on Linux, please refer to :ref:`component-linux-mock-support`.
|
||||||
|
|
||||||
|
.. only:: not esp32p4
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The FreeRTOS POSIX/Linux simulator allows configuring the :ref:`amazon_smp_freertos` version. However, the simulation still runs in single-core mode. The main reason allowing Amazon SMP FreeRTOS is to provide API compatibility with ESP-IDF applications written for Amazon SMP FreeRTOS.
|
The FreeRTOS POSIX/Linux simulator allows configuring the :ref:`amazon_smp_freertos` version. However, the simulation still runs in single-core mode. The main reason allowing Amazon SMP FreeRTOS is to provide API compatibility with ESP-IDF applications written for Amazon SMP FreeRTOS.
|
||||||
|
@@ -9,7 +9,7 @@ FreeRTOS is an open source real-time operating system kernel that acts as the op
|
|||||||
Implementations
|
Implementations
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
The `official FreeRTOS <https://www.freertos.org/index.html>`_ (henceforth referred to as Vanilla FreeRTOS) is a single-core RTOS. In order to support the various multi-core ESP targets, ESP-IDF supports different FreeRTOS implementations, namely **ESP-IDF FreeRTOS** and **Amazon SMP FreeRTOS**.
|
The `official FreeRTOS <https://www.freertos.org/index.html>`_ (henceforth referred to as Vanilla FreeRTOS) is a single-core RTOS. In order to support the various multi-core ESP targets, ESP-IDF supports different FreeRTOS implementations as listed below:
|
||||||
|
|
||||||
ESP-IDF FreeRTOS
|
ESP-IDF FreeRTOS
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
@@ -20,6 +20,8 @@ ESP-IDF FreeRTOS is a FreeRTOS implementation based on Vanilla FreeRTOS v10.4.3,
|
|||||||
|
|
||||||
ESP-IDF FreeRTOS is currently the default FreeRTOS implementation for ESP-IDF.
|
ESP-IDF FreeRTOS is currently the default FreeRTOS implementation for ESP-IDF.
|
||||||
|
|
||||||
|
.. only:: not esp32p4
|
||||||
|
|
||||||
.. _amazon_smp_freertos:
|
.. _amazon_smp_freertos:
|
||||||
|
|
||||||
Amazon SMP FreeRTOS
|
Amazon SMP FreeRTOS
|
||||||
@@ -77,7 +79,7 @@ Unlike Vanilla FreeRTOS, users of FreeRTOS in ESP-IDF **must never call** :cpp:f
|
|||||||
Background Tasks
|
Background Tasks
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
During startup, ESP-IDF and FreeRTOS automatically creates multiple tasks that run in the background (listed in the the table below).
|
During startup, ESP-IDF and the FreeRTOS kernel automatically create multiple tasks that run in the background (listed in the the table below).
|
||||||
|
|
||||||
.. list-table:: List of Tasks Created During Startup
|
.. list-table:: List of Tasks Created During Startup
|
||||||
:widths: 10 75 5 5 5
|
:widths: 10 75 5 5 5
|
||||||
@@ -115,7 +117,7 @@ During startup, ESP-IDF and FreeRTOS automatically creates multiple tasks that r
|
|||||||
- ``22``
|
- ``22``
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Note that if an application uses other ESP-IDF features (e.g., WiFi or Bluetooth), those features may create their own background tasks in addition to the tasks listed in the table above.
|
Note that if an application uses other ESP-IDF features (e.g., Wi-Fi or Bluetooth), those features may create their own background tasks in addition to the tasks listed in the table above.
|
||||||
|
|
||||||
FreeRTOS Additions
|
FreeRTOS Additions
|
||||||
------------------
|
------------------
|
||||||
|
@@ -6,7 +6,7 @@ FreeRTOS (ESP-IDF)
|
|||||||
Overview
|
Overview
|
||||||
--------
|
--------
|
||||||
|
|
||||||
The original FreeRTOS (hereinafter referred to as Vanilla FreeRTOS) is a small and efficient Real Time Operating System supported on many single-core MCUs and SoCs. However, to support numerous dual core ESP targets (such as the ESP32 and ESP32-S3), ESP-IDF provides a dual core SMP (Symmetric Multiprocessing) capable implementation of FreeRTOS, (hereinafter referred to as ESP-IDF FreeRTOS).
|
The original FreeRTOS (hereinafter referred to as Vanilla FreeRTOS) is a small and efficient Real Time Operating System supported on many single-core MCUs and SoCs. However, to support numerous dual core ESP targets (such as the ESP32, ESP32-S3 and ESP32-P4), ESP-IDF provides a dual core SMP (Symmetric Multiprocessing) capable implementation of FreeRTOS, (hereinafter referred to as ESP-IDF FreeRTOS).
|
||||||
|
|
||||||
ESP-IDF FreeRTOS is based on Vanilla FreeRTOS v10.4.3, but contains significant modifications to both API and kernel behavior in order to support dual core SMP. This document describes the API and behavioral differences between Vanilla FreeRTOS and ESP-IDF FreeRTOS.
|
ESP-IDF FreeRTOS is based on Vanilla FreeRTOS v10.4.3, but contains significant modifications to both API and kernel behavior in order to support dual core SMP. This document describes the API and behavioral differences between Vanilla FreeRTOS and ESP-IDF FreeRTOS.
|
||||||
|
|
||||||
@@ -50,9 +50,9 @@ Although an SMP system allows threads to switch cores, there are scenarios where
|
|||||||
SMP on an ESP Target
|
SMP on an ESP Target
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
ESP targets (such as the ESP32, ESP32-S3) are dual core SMP SoCs. These targets have the following hardware features that make them SMP capable:
|
ESP targets (such as the ESP32, ESP32-S3 and ESP32-P4) are dual core SMP SoCs. These targets have the following hardware features that make them SMP capable:
|
||||||
|
|
||||||
- Two identical cores known as CPU0 (i.e., Protocol CPU or PRO_CPU) and CPU1 (i.e., Application CPU or APP_CPU). This means that the execution of a piece of code is identical regardless of which core it runs on.
|
- Two identical cores known as CPU0 and CPU1. This means that the execution of a piece of code is identical regardless of which core it runs on.
|
||||||
- Symmetric memory (with some small exceptions).
|
- Symmetric memory (with some small exceptions).
|
||||||
|
|
||||||
- If multiple cores access the same memory address, their access will be serialized at the memory bus level.
|
- If multiple cores access the same memory address, their access will be serialized at the memory bus level.
|
||||||
@@ -60,9 +60,12 @@ ESP targets (such as the ESP32, ESP32-S3) are dual core SMP SoCs. These targets
|
|||||||
|
|
||||||
- Cross-core interrupts that allow one CPU to trigger and interrupt on another CPU. This allows cores to signal each other.
|
- Cross-core interrupts that allow one CPU to trigger and interrupt on another CPU. This allows cores to signal each other.
|
||||||
|
|
||||||
|
|
||||||
|
.. only:: not esp32p4
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The ``PRO_CPU`` and ``APP_CPU`` aliases for CPU0 and CPU1 exist in ESP-IDF as they reflect how typical ESP-IDF applications utilize the two CPUs. Typically, the tasks responsible for handling wireless networking (e.g., Wi-Fi or Bluetooth) are pinned to CPU0 (thus the name PRO_CPU), whereas the tasks handling the remainder of the application are pinned to CPU1 (thus the name APP_CPU).
|
CPU0 is also known as Protocol CPU or ``PRO_CPU`` and CPU1 is also known as Application CPU or ``APP_CPU``. The ``PRO_CPU`` and ``APP_CPU`` aliases for CPU0 and CPU1 exist in ESP-IDF as they reflect how typical ESP-IDF applications utilize the two CPUs. Typically, the tasks responsible for handling wireless networking (e.g., Wi-Fi or Bluetooth) are pinned to CPU0 (thus the name PRO_CPU), whereas the tasks handling the remainder of the application are pinned to CPU1 (thus the name APP_CPU).
|
||||||
|
|
||||||
|
|
||||||
.. ------------------------------------------------------ Tasks --------------------------------------------------------
|
.. ------------------------------------------------------ Tasks --------------------------------------------------------
|
||||||
@@ -112,7 +115,7 @@ Task deletion in Vanilla FreeRTOS is called via :cpp:func:`vTaskDelete`. The fun
|
|||||||
ESP-IDF FreeRTOS provides the same :cpp:func:`vTaskDelete` function. However, due to the dual core nature, there are some behavioral differences when calling :cpp:func:`vTaskDelete` in ESP-IDF FreeRTOS:
|
ESP-IDF FreeRTOS provides the same :cpp:func:`vTaskDelete` function. However, due to the dual core nature, there are some behavioral differences when calling :cpp:func:`vTaskDelete` in ESP-IDF FreeRTOS:
|
||||||
|
|
||||||
- When deleting a task that is pinned to the other core, that task's memory is always freed by the idle task of the other core (due to the need to clear FPU registers).
|
- When deleting a task that is pinned to the other core, that task's memory is always freed by the idle task of the other core (due to the need to clear FPU registers).
|
||||||
- When deleting a task that is currently running on the other core, a yield is triggered on the other core and the task's memory is freed by one of the idle tasks (depending on the task's core affinity)
|
- When deleting a task that is currently running on the other core, an yield is triggered on the other core and the task's memory is freed by one of the idle tasks (depending on the task's core affinity)
|
||||||
- A deleted task's memory is freed immediately if...
|
- A deleted task's memory is freed immediately if...
|
||||||
|
|
||||||
- The tasks is currently running on this core and is also pinned to this core
|
- The tasks is currently running on this core and is also pinned to this core
|
||||||
@@ -419,6 +422,8 @@ Given that interrupts (or interrupt nesting) are disabled during a critical sect
|
|||||||
Misc
|
Misc
|
||||||
----
|
----
|
||||||
|
|
||||||
|
.. only:: SOC_CPU_HAS_FPU
|
||||||
|
|
||||||
Floating Point Usage
|
Floating Point Usage
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@@ -44,6 +44,8 @@ POSIX/Linux 模拟器的模拟
|
|||||||
|
|
||||||
ESP-IDF 已支持使用 `FreeRTOS POSIX/Linux 模拟器 <https://www.freertos.org/FreeRTOS-simulator-for-Linux.html>`_ 预览应用程序在目标芯片上的运行效果。使用该模拟器可以在主机上运行 ESP-IDF 组件,并使这类组件可用于在主机上运行的 ESP-IDF 应用程序。目前,只有一部分组件可以在 Linux 上构建。此外,各组件移植到 Linux 上后,其功能可能也会受到限制,或与在芯片目标上构建该组件的功能有所不同。有关所需组件在 Linux 上是否受支持的更多信息,请参阅 :ref:`component-linux-mock-support`。
|
ESP-IDF 已支持使用 `FreeRTOS POSIX/Linux 模拟器 <https://www.freertos.org/FreeRTOS-simulator-for-Linux.html>`_ 预览应用程序在目标芯片上的运行效果。使用该模拟器可以在主机上运行 ESP-IDF 组件,并使这类组件可用于在主机上运行的 ESP-IDF 应用程序。目前,只有一部分组件可以在 Linux 上构建。此外,各组件移植到 Linux 上后,其功能可能也会受到限制,或与在芯片目标上构建该组件的功能有所不同。有关所需组件在 Linux 上是否受支持的更多信息,请参阅 :ref:`component-linux-mock-support`。
|
||||||
|
|
||||||
|
.. only:: not esp32p4
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
FreeRTOS POSIX/Linux 模拟器支持配置 :ref:`amazon_smp_freertos` 版本,但模拟仍在单核模式下运行。支持 Amazon SMP FreeRTOS 主要是为给 Amazon SMP FreeRTOS 编写的 ESP-IDF 应用程序提供 API 兼容性。
|
FreeRTOS POSIX/Linux 模拟器支持配置 :ref:`amazon_smp_freertos` 版本,但模拟仍在单核模式下运行。支持 Amazon SMP FreeRTOS 主要是为给 Amazon SMP FreeRTOS 编写的 ESP-IDF 应用程序提供 API 兼容性。
|
||||||
|
Reference in New Issue
Block a user