Do I need to provide static memory allocators?

I’m a bit confused if I should provide vApplicationGetIdleTaskMemory() etc.

According to FreeRTOS - The Free RTOS configuration constants and configuration options - FREE Open Source RTOS for small real time embedded systems I should provide this function if configSUPPORT_STATIC_ALLOCATION is set to 1.

However, looking in the source, tasks.c seems to provide this function! (Line 8651 in my copy). Does that mean I don’t need to provide it? Is that document out of date?

Many thanks
Hugo

There is an option for the kernel to provide the memory for you if configKERNEL_PROVIDED_STATIC_MEMORY is also set to 1. See FreeRTOS-Kernel/tasks.c at main · FreeRTOS/FreeRTOS-Kernel · GitHub

You have 2 options -

  1. Use the kernel provided implementation of vApplicationGetIdleTaskMemory - Set configKERNEL_PROVIDED_STATIC_MEMORY to 1 for this case.
  2. Supply your own implementation of vApplicationGetIdleTaskMemory - Do not define configKERNEL_PROVIDED_STATIC_MEMORY and provide your implementation of vApplicationGetIdleTaskMemory.