how to run some codes before tasks?

davedoors wrote on Monday, July 08, 2013:

Quoting from the page referenced above

The application must provide a stack overflow hook function if configCHECK_FOR_STACK_OVERFLOW is not set to 0. The hook function must be called vApplicationStackOverflowHook(), and have the prototype below:

void vApplicationStackOverflowHook( xTaskHandle xTask,
                                    signed portCHAR *pcTaskName );

so if you define configCHECK_FOR_STACK_OVERFLOW to 1 or 2 then you have to provide the vApplicationStackOverflowHook() function yourself, and you can implement it to do whatever you want.