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 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.
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.
This commit combines various task utility API additions in IDF FreeRTOS and with
their Amazon SMP FreeRTOS addition counterparts. The folloiwng functions have
been moved to freertos_tasks_c_additions.h and idf_additions.h as these API
are considered public:
- xTaskGetCurrentTaskHandleForCPU()
- xTaskGetIdleTaskHandleForCPU()
- xTaskGetAffinity()
- pxTaskGetStackStart()
Also fixed in missing #if macros when vTaskCoreAffinityGet() is called in
Amazon SMP FreerTOS tests.
This commit moves xTaskIncrementTickOtherCores() to freertos_tasks_c_additions.h
and freertos_idf_additions_priv.h (as API is private). This reduces the code
differences cmpared to upstream FreeRTOS.
- The following IDF API additions are moved to freertos_tasks_c_additions.h
(implementation) and freertos_idf_additions_priv.h (declaration) as APIs are
private. This reduces the source code difference from upstream.
- prvENTER_CRITICAL_OR_SUSPEND_ALL()
- prvEXIT_CRITICAL_OR_RESUME_ALL()
- prvENTER_CRITICAL_OR_MASK_ISR()
- prvEXIT_CRITICAL_OR_UNMASK_ISR()
- vTaskTakeKernelLock()
- vTaskReleaseKernelLock()
- Rename vTask[Take/Release]KernelLock() to prv[Take/Release]KernelLock() to
indicate that the this API is private.
- Move vTaskStartSchedulerOtherCores()
- implementation to freertos_tasks_c_additions.h
- declaration to freertos_idf_additions_priv.h as API is private
- Rename vTaskStartSchedulerOtherCores() -> prvStartSchedulerOtherCores() to
indicate that the function is private.
- Uncrustified IDF addition related header/source files
- Reorganized functions into groups
- linker_common.lf updated to adhere to new function organization
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 refactors the "freertos" component's structure as follows:
- "FreeRTOSConfig.h" related files moved to "./config" directory
- Refactored CMakeLists.txt file in preparation for v10.5.1 upgrade
- Grouped list appends based on component organization
- Removed some unecessarily public "include_dirs"
- Removed FreeRTOS-openocd.c
- uxTopUsedPriority has been added back to tasks.c since v10.4.2
- Thus the workaround in FreeRTOS-openocd.c is no longer needed and can
be removed.
* Added a POSIX/Linux simulator that is compatible with the Amazon
FreeRTOS SMP API. Note that the simulator itself is still
single core, like the IDF FreeRTOS POSIX/Linux simulator.
This commit adds the corresponding CreateWithCaps functions for tasks:
- xTaskCreatePinnedToCoreWithCaps()
- xTaskCreateWithCaps()
- vTaskDeleteWithCaps()
Documentation and migraiton guide have been updated accordingly.
Closes https://github.com/espressif/esp-idf/issues/11216
Previously, some IDF FreeRTOS API additions that were meant to be private were
exposed through the same "idf_additions.h" header. This commit moves those
functions to a separate header included via
"esp_private/freertos_idf_additions_priv.h" so that they are not mistaken as
public API by users.
This commit also fixes some missing include and C++ guards in idf_additions.h
This commit merges the "FreeRTOSConfig_smp.h" file into the "FreeRTOSConfig.h".
The configurations for all FreeRTOS implementations are now stored in a single
file.
xTaskRemoveFromUnorderedEventList is a scheduler internal function, thus will
never be called by users. Therefore, the compatbility define is not necessary.
The task snapshot tests use esp_cpu_stall() to stall the other CPU before
manually walking the task lists. However, it is possible that the other CPU
was also accessing the task lists when esp_cpu_stall() is called, leading to
flakey tests
This commit fixes the test by using a 2-way handshake instead of
esp_cpu_stall().
This commit updates the linker fragment file for Amazon SMP FreeRTOS.
- Linker fragment file's formatting was updated
- Placement rules of functions is now clearly specified inside the linker
fragment file.
- Some extra functions are now placed in flash in accordance to the new
placement rules.
This commit removes the dependency on portUSING_MPU_WRAPPERS on the Xtensa port
of IDF FreeRTOS. This dependency was added due to a hack implemented in the
upstream port that required the usage of the "xMPUSettings" member of the TCB.
The "xMPUSettings" would be used as a pointer to the task's coprocessor save
area on the stack, even though FreeRTOS MPU support was not available.
The hack has now been removed, and the CPSA pointer is now calculated using
a combination of constant offsets values and the pxEndOfStack member of the
TCB.
Note: This impelemtation was copied from the Xtensa port of Amazon SMP FreeRTOS.
This commit updates how configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS is defined
by default it to 0 if not defined elsewhere. Dependent code now check for
"configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS == 1" instead.
The following changes have been made in this commit:
1. configMINIMAL_STACK_SIZE is now defined as CONFIG_FREERTOS_IDLE_TASK_STACKSIZE.
2. Removed configIDLE_TASK_STACK_SIZE config as it was redundant.
3. Updates the order of allocating the TCB and stack memory to avoid the
stack memory overriding the TCB memory when the stack grows downwards.
4. CONFIG_FREERTOS_IDLE_TASK_STACKSIZE is now incorporated into the
FreeRTOSConfig_smp.h to configure the IDLE0 stack size.
* Added port layer from the FreeRTOS POSIX port, added
additional port code for ESP-IDF.
* Created another hello world example using that POSIX
port in tools/test_apps.
* Removed old linux app
`vTaskGetSnapshot` is being used in coredump module to collect diagnostic information.
It is possible that input arguments are invalid and `assert` in this situation is not
correct.
This commit modifies API signature to return pdTRUE in case of success, and pdFALSE
otherwise. Caller can verify return value and then take appropriate decision.
This commit updates how the TLS pointers deletion callbacks are called
during task deletion in the FreeRTOS SMP kernel. The callbacks are now
routed through the portCLEAN_UP_TCB() macro. This commit also adds a
new kconfig option CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS to control
the enablement of the TLSP deletion callbacks.
This commit moves the IDF API additions from task.h/task.c to seperate header/source files.
- Declarations moved to "idf_additions.h"
- Definitions moved to "freertos_task_c_additions.h"
The API descriptions have also been updated.
Moved the following kconfig options out of the target component:
* CONFIG_ESP*_DEFAULT_CPU_FREQ* -> esp_system
* ESP*_REV_MIN -> esp_hw_support
* ESP*_TIME_SYSCALL -> newlib
* ESP*_RTC_* -> esp_hw_support
Where applicable these target specific konfig names were merged into
a single common config, e.g;
CONFIG_ESP*_DEFAULT_CPU_FREQ -> CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
This commit updates task snapshot as follows:
- Refactored implementation to increase readability
- Implementation moved into freertos_tasks_c_additions.h
- freertos_tasks_c_additions.h made a private header
- Support SMP FreeRTOS
- Removed configENABLE_TASK_SNAPSHOT option. CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
is direclty used instead.
This commit fixes various build errors in IDF (and tests) when compiling
with SMP FreeRTOS:
- Updated usage of xTaskGetIdleTaskHandle()
- Disable sysview tracing macros
- Update some task snapshot functions
- Disabled test_freertos_hooks.c test as vApplicationIdleHook() and
vApplicationTickHook() are used.
This commit updates the copied Xtensa port to support the new porting interfaces
of the FreeRTOS SMP kernel. These modifications are mainly contained in
- FreeRTOSConfig.h
- FreeRTOSConfig_smp.h
- portmacro.h
- port.c
Some porting interfaces have changed in FreeRTOS SMP. In order to allow building
with IDF, compatibility interfaces have been added.
This commit refactors the FreeRTOS configuration headers as follows:
- Layout is now similar to FreeRTOSConfig.h found in other upstream demos
- Separate out Vanilla FreeRTOS configurations and ESP-IDF additions
- Move/remove some irrelevant/unused macros and configurations
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
This commit does the following:
- Adds SPDX license identifiers to FreeRTOS sources. Remove those FreeRTOS sources from
the copyright ignore list.
- Update xtensa port files to match FreeRTOS v10.4.3. Added SPDX license identifiers
to the port files.
- Fixed some improperly licensed files
- Removed portbenchmark.h from RISC-V port