2025-05-13 12:31 AM
Hello.
I bought Riverdi board and start to develop my code.
I found in FREERTOS_M7 Config parameters RTOS CHECK_FOR_STACK_OVERFLOW.
Documentation says
CHECK_FOR_STACK_OVERFLOW
Parameter Description:
FreeRTOS provides two optional mechanisms that can be used to assist in stack overflow detection and debugging.
- when CHECK_FOR_STACK_OVERFLOW is set to 1 (option1), one mechanism is used
- when CHECK_FOR_STACK_OVERFLOW is set to 2 (option2), both mechanisms are used.
If CHECK_FOR_STACK_OVERFLOW is not set to 0 (Disabled), the application must provide a stack overflow hook (or callback) function: void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );
The kernel will call that stack overflow hook whenever a stack overflow is detected
Note: when set to 1 or 2, a function with an empty body is generated in the freertos.c file (to be completed by the user)
So I set CHECK_FOR_STACK_OVERFLOW = 1, trigger a stack overflow by an infinite recursive and set a bkpoint in
But when I run the code I just reach HardFault_Handler
What am I wrong ?
2025-05-13 5:00 AM
See here for how this works. It only checks when tasks are switched.
FreeRTOS stack usage and stack overflow checking - FreeRTOS™