feat(freertos/smp): Update ports to support Amazon FreeRTOS v11.0.1

- vTaskPreemptionDisable()/vTaskPreemptionEnable() are no longer available in
single-core builds.
- xTaskIncrementTick() calls must now be wrapped by critical section
- Minimal Idle Task renamed to Passive Idle Task
- Port critical section APIs updated
This commit is contained in:
Darian Leung
2024-02-02 23:37:36 +08:00
parent 888678d102
commit 83c686c744
20 changed files with 148 additions and 135 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -27,15 +27,10 @@
/* ---------------- Amazon SMP FreeRTOS -------------------- */
#if CONFIG_FREERTOS_SMP
#define configUSE_CORE_AFFINITY 1
/* This is always enabled to call IDF style idle hooks, by can be "--Wl,--wrap"
* if users enable CONFIG_FREERTOS_USE_MINIMAL_IDLE_HOOK. */
#define configUSE_MINIMAL_IDLE_HOOK 1
/* IDF Newlib supports dynamic reentrancy. We provide our own __getreent()
* function. */
#define configNEWLIB_REENTRANT_IS_DYNAMIC 1
* if users enable CONFIG_FREERTOS_USE_PASSIVE_IDLE_HOOK. */
#define configUSE_PASSIVE_IDLE_HOOK 1
#endif
/* ----------------------- System -------------------------- */
@@ -46,9 +41,13 @@
* - We simply provide our own INIT and DEINIT functions
* - We set "SET" to a blank macro since there is no need to set the reentrancy
* pointer. All newlib functions calls __getreent. */
#define configINIT_TLS_BLOCK( xTLSBlock ) esp_reent_init( &( xTLSBlock ) )
#if CONFIG_FREERTOS_SMP
#define configINIT_TLS_BLOCK( xTLSBlock, pxTopOfStack ) esp_reent_init( &( xTLSBlock ) )
#else /* CONFIG_FREERTOS_SMP */
#define configINIT_TLS_BLOCK( xTLSBlock ) esp_reent_init( &( xTLSBlock ) )
#endif /* CONFIG_FREERTOS_SMP */
#define configSET_TLS_BLOCK( xTLSBlock )
#define configDEINIT_TLS_BLOCK( xTLSBlock ) _reclaim_reent( &( xTLSBlock ) )
#define configDEINIT_TLS_BLOCK( xTLSBlock ) _reclaim_reent( &( xTLSBlock ) )
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1