STM32FreeRTOS config bugged.
Posted: Tue Aug 12, 2025 3:22 pm
I'm trying to introduce freertos into a project, its been a little while so I'm rusty...
However I've ran into some issue that might actually be a bug in the library.
Firstly on a fresh pull from github, the config file untouched. I get the error ... when trying to compile.
Following the defines up into the config defaults file which is called by FreeRTOSConfig.h
On line 115
Which uses
Firstly _end doesnt exsist in the linker script, so that macro will fail right away.
Secondly _Min_Stack_Size = 0x400; /* required amount of stack */ wont fit within a char
And nor would _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ fit within a char.
If I have made a mistake in this varient setup where these defines are meant to be more properly ... defined somewhere... Or if i need to manually set these values within the freertos config. Please let me know. But at the moment this looks like a bug.
However I've ran into some issue that might actually be a bug in the library.
Firstly on a fresh pull from github, the config file untouched. I get the error ... when trying to compile.
Code: Select all
..\STM32FreeRTOS\portable\MemMang\heap_1.c:61:24: error: variably modified 'ucHeap' at file scope
61 | static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
On line 115
Code: Select all
#define configTOTAL_HEAP_SIZE ((size_t)((uint32_t)&_estack - (uint32_t)&_Min_Stack_Size - (uint32_t)&_end))
Code: Select all
extern char _end; /* Defined in the linker script */
extern char _estack; /* Defined in the linker script */
extern char _Min_Stack_Size; /* Defined in the linker script */
Secondly _Min_Stack_Size = 0x400; /* required amount of stack */ wont fit within a char
And nor would _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ fit within a char.
If I have made a mistake in this varient setup where these defines are meant to be more properly ... defined somewhere... Or if i need to manually set these values within the freertos config. Please let me know. But at the moment this looks like a bug.