Get unsolved symbol vApplicationGetTimerTaskMemory

Hello,

I am trying to user software timers. So, add these in FreeRTOSConfig.h:
#define configSUPPORT_STATIC_ALLOCATION 1
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY 3
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE

But, once they are added, the compiler complains this error:
“unsolved symbol vApplicationGetTimerTaskMemory, first referenced in .FreeRTOS/FreeRTOSv202112.00/FreeRTOS/Source/timers.obj”.

What might go wrong?

Thanks!
Crane

Hi Crane,

If you are trying to avoid any/all use of dynamic memory allocation, then you will need to supply an implementation of vApplicationGetTimerTaskMemory(). That function helps FreeRTOS know where you have provided memory for the timer task. By convention, anything in FreeRTOS that starts with “Application” is meant to be provided by the application (not by FreeRTOS).

However, if you are OK with some use of dynamic memory allocation, then you can add this to your FreeRTOSConfig.h:

#define configSUPPORT_DYNAMIC_ALLOCATION 1

In that case, you don’t need to provide an implementation of vApplicationGetTimerTaskMemory().

Ok got it. Thanks Jeff!
The function is added and the issue is addressed.

Regards,
Crane