FreeRTOS Version Update

fwdevgw
Posts: 2
Joined: Tue Feb 04, 2025 11:38 am

FreeRTOS Version Update

Postby fwdevgw » Tue Feb 04, 2025 11:51 am

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!

MicroController
Posts: 2046
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: FreeRTOS Version Update

Postby MicroController » Tue Feb 04, 2025 2:00 pm

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.

fwdevgw
Posts: 2
Joined: Tue Feb 04, 2025 11:38 am

Re: FreeRTOS Version Update

Postby fwdevgw » Wed Feb 12, 2025 3:40 pm

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!

Who is online

Users browsing this forum: No registered users and 85 guests