Undefined Symbol deping on static/dynamic memory use
Hi,
I’m trying to set up my first project with FreeRTOS. I want to run it on a STM32L0, for the first tests a NUCLEO-L011K4 using Keil µVision 5.
I included the FreeRTOS by adding FreeRTOS/source, FreeRTOS/soruce/include and FreeRTOS/source/portable/RVDS/ARM_CM0 directorys to the include path and the files to the project. I took the FreeTROSConfig.h from an generated project.
First I got an error because the SysTickHandler was redefined by FreeRTOS. To solve this, I just removed the auto generated SysTickHandler from my application.
Now I get undefined symbol errors from FreeRTOS, depending on the configuration of static/dynamic memory allocation (I want everything statically allocated):
configSUPPORTSTATICALLOCATION 1
vApplicationGetIdleTaskMemory (reffered from task.o)
vApplicationGetTimerTaskMemory (reffered from timers.o)
configSUPPORTDYNAMICALLOCATION 1
pvPortMalloc (reffered from eventgroups.o)
vPortFree (reffered from eventgroups.o)
Do I have to define the functions by myself?
Undefined Symbol deping on static/dynamic memory use
configSUPPORTSTATICALLOCATION 1 vApplicationGetIdleTaskMemory (reffered from task.o) vApplicationGetTimerTaskMemory (reffered from timers.o)In this case you need to supply these functions to provide static memory to the tasks created by the kernel. Grep the FreeRTOS/Demo directory to find examples. See the following link for more information: https://www.freertos.org/a00110.html#configSUPPORTSTATICALLOCATION
configSUPPORTDYNAMICALLOCATION 1 pvPortMalloc (reffered from eventgroups.o) vPortFree (reffered from eventgroups.o)In this case you need to provide the memory allocation functions. This is not needed if configSUPPORTDYNAMICALLOCATION is 0. https://www.freertos.org/a00111.html
Undefined Symbol deping on static/dynamic memory use
Thanks, I wasn’t aware that I need to supply these function by myself. I copied them from a WIN32 example.
But when I want to use dynamic allocation, then I have to implement the portMalloc and portFree functions myself? So basicly they would just be wrapers for the normal malloc and free functions.
Undefined Symbol deping on static/dynamic memory use
No – please see the links I included in my last post.