cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS: Stack overflow checking mechanism missing.

Johi
Senior III

Hello,

According to https://www.freertos.org/Stacks-and-stack-overflow-checking.html, i.e. the FreeRTOS reference, one needs to set configCHECK_FOR_STACK_OVERFLOW to 1 or 2 in order to activate stack overflow checking. In case of a stack overflow FreeRTOS should call

void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName)

I activated the mechanism in the ioc configuration file but I observe that vApplicationStackOverflowHook is called each cycle and not in case of a stack overflow i.e. the stack overflow mechanism implementations themselves are missing. The hook should be called in case of abnormalities if I understand the documentation correctly and not each cycle.

Is my analysis correct and if so, does anybody have a reference to the proper implementation of this mechanism?

1 REPLY 1
KnarfB
Principal III

The implementations are in stack_macros.h and used to work (not verified lately) if configCHECK_FOR_STACK_OVERFLOW is not 0.

hth

KnarfB