configTIMER_TASK_STACK_DEPTH:
Sets the size of the stack (in words, not bytes) allocated to the timer service task.
Timer callback functions execute in the context of the timer service task. The stack requirement of the timer service task therefore depends on the stack requirements of the timer callback functions.
So, do I need to set up a stack depth if I’m going to use static timers? What should I write in configTIMER_TASK_STACK_DEPTH if I’m not going to use the dynamic version?
Now you are getting into a different question, how to make the Timer/Service task to be created with a static allocation.
If you set the flag configSUPPORT_STATIC_ALLOCATION, then the idle task, and if needed the timer task are created with callback to the application to get the static buffers for their TCB/Stack with calls to vApplicationGetIdleTaskMemory and vApplicationGetTimerTaskMemory.
These subroutine return the address of the static buffer for the TCB, that stack, and the size of the stack.
When these are used, the stack size parameters are not used (unless your own code for the call backs use them)
That page says to add timers.c to your PROJECT so you compile the code in it. The files that will use the timers also need to include timers.h for the definitions.
If you don’t have the #define configSUPPORT_DYNAMIC_ALLOCATION 0 statement in your code, the system assumes that the flag is set to one, so since when you created the objects they could have possibly been created either statically or dynamically, it needs to include the code to free them when you destroy them.