This commit changes the approach used to override select function
in FreeRTOS simulator.
The previous approach relied on '--wrap', which is a feature of GNU
linker that performs symbol substitution at link time. Sadly this
feature is not present in macOS linker.
The alternative solution is to define 'select' wrapper as a regular
(exported) symbol, preventing it from being loaded from system
libraries. To call the "real" select implementation we use dlsym
function and find the function pointer at run time. This solution
works on both Linux and macOS.
This commit adds esp_backtrace_print_all_tasks() which prints the backtraces
of all tasks at runtime.
Closes https://github.com/espressif/esp-idf/issues/9708
CLoses https://github.com/espressif/esp-idf/pull/11575
[Omar Chebib: Prevent task switching while printing backtraces of tasks.]
[Omar Chebib: Ensure all task stacks are flushed from register to RAM.]
[Omar Chebib: Removed esp_task_snapshot_to_backtrace_frame() as task snapshot is private API.]
[Omar Chebib: Added test case for esp_backtrace_print_all_tasks().]
Signed-off-by: Omar Chebib <omar.chebib@espressif.com>
IDF FreeRTOS v10.5.1 no longer accepts out of range xCoreID arguments in
"PinnedToCore" task creation functions when building for single-core. This
commit fixes those violations through ESP-IDF.
This commit does the following:
- removes the xCoreID member from the TCB when building for single-core
- xCoreID is no longer hard set to 0 when calling "PinnedToCore" task creation
functions in single-core
- Tidy up or add missing xCoreID asserts for functions that take xCoreID as an
argument:
- Functions that set/query a variable of a particular core will call
taskVALID_CORE_ID() to ensure ) 0 <= xCoreID < configNUMBER_OF_CORES
- Task creation functions that accept xCoreID also call taskVALID_CORE_ID()
but also allow tskNO_AFFINITY.
- Fix TaskStatus_t
- Remove xCoreID from TaskStatus_t if configTASKLIST_INCLUDE_COREID is not
defined.
- Set xCoreID to 0 when calling vTaskGetInfo() in single-core builds
This commit refactors the following macros so that calling them no longer
requires referencing pxTCB->xCoreID.
- taskIS_YIELD_REQUIRED()
- taskIS_YIELD_REQUIRED_USING_PRIORITY()
- taskIS_AFFINITY_COMPATIBLE()
This commit deprecates the "freertos/xtensa_context.h" and "xtensa/xtensa_context.h"
include paths. Users should use "xtensa_context.h" instead.
- Replace legacy include paths
- Removed some unnecessary includes of "xtensa_api.h"
- Add warning to compatibility header
This commit deprecates the "freertos/xtensa_api.h" and "xtensa/xtensa_api.h"
include paths. Users should use "xtensa_api.h" instead.
- Replace legacy include paths
- Removed some unnecessary includes of "xtensa_api.h"
- Replaced some calls with "esp_cpu_..." equivalents
- Add warning to compatibility header
This commit refactors suspend-resume tests by moving them to appropraite
test files. This commit also removes tests which are not necessary or
have been subsumed by refactored tests.
This commit adds the ability to set the core affinity for the FreeRTOS
Timer Service task when multi-core configuration is enabled. This commit
also adds a Kconfig option to set the core affinity of the timer task
via the menuconfig.
Closes https://github.com/espressif/esp-idf/issues/10315
This commit adds a taskVALID_CORE_ID() macro, similar to the one offered in
Amazon SMP FreeRTOS.
- Various functions have been updated to use that macro
- Removed some unecessary static asserts of CONFIG_FREERTOS_NO_AFFINITY and
added casting.
- Uncrustify changes
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.