It was noticed that when high level compiler optimizations are enabled,
the compiler optimizes some list manupulation code. This commit enables
the configLIST_VOLATILE for list elements to prevent the compiler from
optimizing out essential kernel code.
Revert "fix(freertos/idf): Add workaround for same priority preemption in xTaskIncrementTick()"
Closes IDF-8428
See merge request espressif/esp-idf!26732
This commit deprecates xTaskGetAffinity(), xTaskGetCurrentTaskHandleForCPU()
and xTaskGetIdleTaskHandleForCPU() APIs for IDF-FreeRTOS kernel.
Instead, users are directed to use alternatives. All other
components in IDF using these functions have been updated accordingly.
This commit refactors some of the thread safety convenience macros by removing
some repeated definitions and keeping them all in "freertos_idf_additions_priv.h"
* The function was based on an outdated IDF/FreeRTOS
combination which didn't always require zero-ing
the TCB. This has been changed in the current
IDF/FreeRTOS combination, leading to crashes.
Unconditionally zero-ing the TCB fixes this problem.
This commit mainly targets the ESP32-P4. It adds supports for coprocessors on
RISC-V based targets. The coprocessor save area, describing the used coprocessors
is stored at the end of the stack of each task (highest address) whereas each
coprocessor save area is allocated at the beginning of the task (lowest address).
The context of each coprocessor is saved lazily, by the task that want to use it.
This commit does the following:
- Update doxygen comments in FreeRTOS headers to remove unsupported doxygen
labels and internal functions
- Fixed existing doxygen warnings in FreeRTOS headers
This commit temporarily disables a bugfixed introduced by FreeRTOS v10.5.1 that
ensures timed out tasks will only preempt if their priority is higher than the
currently running task.
This bugfix has been temporarily reversed due to some compatibility issues with
some IDF tests.
This commit adds a workaround for a compiler optimization issue in FreeRTOS
v10.5.1 in xTaskResumeAll() where pxTCB is only read once, even if in a loop.
A follow up ticket has been added to properly resolve this issue.
This commit optimizes the following utility functions to achieve higher
overall system performance:
xTaskGetCurrentTaskHandle():
- Made into stand alone function instead of wrapper call to "ForCore" variant
- Replaced critical sections with disabling interrupts. Lack of lock contention
improves performance.
xTaskGetCurrentTaskHandleForCore():
- Removed unecessary critical sections
xTaskGetSchedulerState():
- Replaced critical sections with disabling interrupts. Lack of lock contention
improves performance.
Previously the linux port of FreeRTOS set configMAX_PRIORITIES to 7. However,
multiple linux POSIX simulator examples will call API that create tasks with
priortiies >= 7.
This commit fixes the configMAX_PRIORITIES and unifies all ports to have 25
priorities.
Various convenience macros in tasks.c will simply leave macro arguments unused
when built for single-core. This leads to an 'unused variable' warning.
This commit updates those macrso so that the unused arguments have a
'(void)' statement.
Following the upgrade to FreeRTOS kernel v10.5.1, this commit updates the
version numbers, licenses, and SBOM files of FreeRTOS files to reflect v10.5.1.
Note:
- Updated licenses as v10.5.1 now uses SPDX format
- Removed CVE-2021-43997 as it was fixed post v10.4.5
This commit makes v10.5.1 the default FreeRTOS kernel in ESP-IDF by removing
the CONFIG_FREERTOS_USE_KERNEL_10_5_1 option and v10.4.3 specific code
blocks.
This commit removes the v10.4.3 kernel files in prepartion for upgrading to
v10.5.1.
- Portable files still remain
- Added as a separate commit to preserve commit history
* Added prvTaskCreateDynamicAffinitySetWithCaps
and prvTaskCreateDynamicPinnedToCoreWithCaps
which allocate the task's stack in PSRAM instead of
internal RAM. These functions are only available if
PSRAM is enabled.
This commit fixes an issue where xPortCanYield() function may not be
able to detect an ISR context when HW interrupt nesting is active on
a CLIC interrupt controller such as on esp32p4.
This commit adds `pvTaskGetCurrentTCBForCore()` to get a void pointer to the
current TCB of a particular core. This removes the need to `extern `pxCurrentTCB`
in esp_gdbstub.
This commit deprecates the `#include "freertos/task_snapshot.h" include path:
- Adds compatibility header with compile time warning
- Removes hints related to `task_snapshot.h`
- Adds entry to migration guide
Task snapshot API were never intended to be called from user code. This commit
makes task snapshot a private API thus moves `#include "freertos/task_snapshot.h"`
to `#include "esp_private/freertos_debug.h"`.
Task snapshot related Kconfig options have also been hidden.
Note: Added 'freertos_common' mapping to ldgen mapping execptions lists due to
inlining of 'freertos_debug.h' functions.
This commit adds beta support for the FreeRTOS v10.5.1 kernel which can be
enabled by enabling the CONFIG_FREERTOS_USE_KERNEL_10_5_1 option.
The following changes have been made:
- Updated freertos/CMakeLists.txt to build v10.5.1 kernel with v10.4.3. ports
- Updated existing Xtensa and RISC-V ports to work with V10.5.1
- Modifications to other ESP-IDF components to work with v10.5.1
- Added some ESP-IDF specific tracing changes to v10.5.1 kernel
- Make CONFIG_FREERTOS_USE_KERNEL_10_5_1 a public option
Note: The beta release is missing some minor fixes, performance improvements,
and features. Using this beta release for production is not recommended.
Closes https://github.com/espressif/esp-idf/issues/7137
This commit adds the SMP critical section changes to the v10.5.1 kernel. These
changes are temporarily documented in the `idf_changes.md` document. This
commit...
- Adds granular spinlocks to each data group (e.g., kernel, queues, event_groups etc.)
- Updates critical section macros to use those spinlocks
- Add missing critical sections required in SMP
This commit adds the key kernel changes to the v10.5.1 kernel to support
dual-core SMP. These changes are temporarily documented in the `idf_changes.md`
document. This commit...
- Added changes to kernel data structures to support multiple cores
- Changes to scheduling algorithm support SMP scheduling.
- Changes to each FreeRTOS function to support multiple cores and SMP
scheduling algorithm.
Some component test apps do not use the "set(COMPONENTS main)" command in their
project level "CMakeLists.txt", thus leading to their builds pulling in all
ESP-IDF components.
This commit trims the build of multiple component test apps:
- Add "set(COMPONENTS main ...)" to project level "CMakeLists.txt"
- Add missing "PRIV_REQUIRES" in some "main" component "CMakeLists.txt"
Also removed repeated configuraiton options in legacy_i2c_driver/sdkconfig.ci.defaults
as they are already specified in legacy_i2c_driver/sdkconfig.defaults
This commit moves/merges the IDF FreeRTOS "PinnedToCore" task creation
functions from tasks.c/task.h to idf_additions.h/freertos_task_c_additions.h.
Also updated FreeRTOS Mock component to provide mocks for "idf_additions.h"
headers for our mock tests.