Page 1 of 1

FreeRTOS Version Update

Posted: Tue Feb 04, 2025 11:51 am
by fwdevgw
I am using latest version of ESP-IDF (v.5.4.0) but I see that FreeRTOS version is Vanilla FreeRTOS v10.5.1
I need latest freertos version v11.0.0 or later to enable the stack runtime usage for each individual task: this can be done by enabling the configRECORD_STACK_HIGH_ADDRESS even when portSTACK_GROWTH < 0.

Here's the snippet relative to stack computation from tasks.c:

Code: Select all

#if ( ( portSTACK_GROWTH > 0 ) && ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
                pxTaskStatus->pxTopOfStack = pxTCB->pxTopOfStack;
                pxTaskStatus->pxEndOfStack = pxTCB->pxEndOfStack;
#endif
Are you planning to update FreeRTOS to its latest version in the next esp-idf versions?
Thanks!

Re: FreeRTOS Version Update

Posted: Tue Feb 04, 2025 2:00 pm
by MicroController
fwdevgw wrote:
Tue Feb 04, 2025 11:51 am
I need latest freertos version v11.0.0 or later to enable the stack runtime usage for each individual task
No, you don't. uxTaskGetStackHighWaterMark() works on earlier versions too.

Re: FreeRTOS Version Update

Posted: Wed Feb 12, 2025 3:40 pm
by fwdevgw
The uxTaskGetStackHighWaterMark() API works even in previous versions of FreeRTOS but I need the values of pxTopOfStack and pxEndOfStack that are available only when this snippet is run: in latest versions of FreeRTOS the #if condition is in OR instead of AND, so the snippet is availbale even when
portSTACK_GROWTH < 0 (which is the case for ESP32).

Code: Select all

#if ( ( portSTACK_GROWTH > 0 ) && ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
                pxTaskStatus->pxTopOfStack = pxTCB->pxTopOfStack;
                pxTaskStatus->pxEndOfStack = pxTCB->pxEndOfStack;
#endif
That's why I am asking if FreeRTOS will be updated soon in ESP-IDF next releases.
Thanks!