STM32FreeRTOS icon indicating copy to clipboard operation
STM32FreeRTOS copied to clipboard

Documentation suggestion for configCHECK_FOR_STACK_OVERFLOW and for LED_BUILTIN

Open wystewart opened this issue 1 year ago • 1 comments

The FreeRTOS web site says that one must implement function vApplicationStackOverflowHook when enabling configCHECK_FOR_STACK_OVERFLOW . This is not the case for STM32FreeRTOS as it is defined in STM32FreeRTOS.c and there is no option to override. Suggest to document this and to clarify that the user must ensure that LED_BUILTIN is defined in their variant.h for their board as vApplicationStackOverflowHook will hang (while 1) when stack overflow detected and flash the LED. At the very least of not documented, hopefully this post will be found by users through google and will be helpful.

Perhaps vApplicationStackOverflowHook and other error functions could be defined as weak in STM32FreeRTOS.c so that the user can override.

wystewart avatar Apr 03 '24 01:04 wystewart

Hi @wystewart Right it was defined by the library but it can't be defined as weak as it already exist one weaked function. Maybe an other weak function can be added and called by vApplicationStackOverflowHook like this user can redefine it.

Feel free to submit a PR to document or adding extra function or definition.

fpistm avatar Apr 03 '24 07:04 fpistm

Hi @wystewart Now by default there is no function.

fpistm avatar Jul 25 '24 16:07 fpistm