Since I’ve been asking about missing prototypes let me also bring up a bug in the types used. The prototype for vApplicationGetTimerTaskMemory appears to be
void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize );
That gives the type for the stack size as explicitly a unit32_t (already that seems odd). It gets worse though when looking at the example implementations which use this line
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
When running static analysis this flags a type conflict which led me to start digging. In the ARM M4F port configTIMER_TASK_STACK_DEPTH is defined as configMINIMAL_STACK_SIZE which seems eminently reasonable but upon searching for it I find it declared as (unsigned short)120 which is a little odd but not entirely unreasonable for a small memory setup. Now the stack size is used in xTaskCreate where it is typed as configSTACK_DEPTH_TYPE so this is obviously what all other instances of stack size should use (although the examples I’m working from clearly do not).
So tracing back further configSTACK_DEPTH_TYPE defaults to uint16_t so now we have 3 different types for stack sizes. I’m actually a little afraid of searching further.
Robert