esp-idf/tools/test_apps/linux_compatible/linux_freertos
Darian Leung 39cf3638ae change(freertos): Deprecate usage of vPortCleanUpTCB() by applications
Previously, if CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP was enabled, users
would provide a definition for a vPortCleanUpTCB() hook function that is called
right before a task's memory is freed in prvDeleteTCB(). However,
vPortCleanUpTCB() will be reclaimed by ESP-IDF for internal use in v6.0.

This commit introduces the following changes...

Introduced a new CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK option:

- Provides the same pre-deletion hook functionality. But users now define
vTaskPreDeletionHook() instead.
- CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP still exists, but is marked as
deprecated. This is to maintain compatibility with existing applications
that already define vPortCleanUpTCB().
- Removed redundant --wl --wrap workaround with vPortCleanUpTCB()
- Added todo notes to remove support for user defined vPortCleanUpTCB()
completely in v6.0.
- Updated test cases to use new CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK option

Freed up portCLEAN_UP_TCB() to call a new internal vPortTCBPreDeleteHook():

- vPortTCBPreDeleteHook() now replaces the previous "wrapped" implementation
of vPortCleanUpTCB().
- vPortTCBPreDeleteHook() is an internal task pre-delete hook for IDF FreeRTOS
ports to inject some pre-deletion operations.
- Internal pre-delete hook now invokes user provided vTaskPreDeletionHook()
if enabled.
- Relocated vPortTCBPreDeleteHook() to correct section in port.c
2023-08-23 17:50:08 +08:00
..
components/kernel_tests change(freertos): Deprecate usage of vPortCleanUpTCB() by applications 2023-08-23 17:50:08 +08:00
main freertos: Added partial unit tests for Linux simulator 2023-04-25 13:58:57 +08:00
CMakeLists.txt freertos: Added partial unit tests for Linux simulator 2023-04-25 13:58:57 +08:00
pytest_linux_freertos.py ci: increased freertos SMP linux target test timeout 2023-04-28 17:49:37 +08:00
README.md freertos: Added partial unit tests for Linux simulator 2023-04-25 13:58:57 +08:00
sdkconfig.defaults freertos: Added partial unit tests for Linux simulator 2023-04-25 13:58:57 +08:00

Supported Targets Linux

Simple test application for SMP Linux port

Note that the IDF version of the FreeRTOS POSIX/Linux simulator is not tested here, that one is merely the upstream version.

Build

idf.py --preview set-target linux

Amazon FReeRTOS SMP configuration is already set via sdkconfig.defaults, no need to configure.

idf.py build

Run

idf.py monitor

After the test output, input: ![ignore] to not run the ignored test