mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-15 08:32:42 +08:00
feat(freertos): Add crash and jump to panic for "abort()"
Remove compiling warning.
This commit is contained in:
@ -317,12 +317,9 @@ int xPortInIsrContext(void)
|
|||||||
|
|
||||||
void __attribute__((weak, noreturn)) vApplicationStackOverflowHook(xTaskHandle xTask, const char *pcTaskName)
|
void __attribute__((weak, noreturn)) vApplicationStackOverflowHook(xTaskHandle xTask, const char *pcTaskName)
|
||||||
{
|
{
|
||||||
int *p = NULL;
|
|
||||||
|
|
||||||
ets_printf("***ERROR*** A stack overflow in task %s has been detected.\r\n", pcTaskName);
|
ets_printf("***ERROR*** A stack overflow in task %s has been detected.\r\n", pcTaskName);
|
||||||
|
|
||||||
/* cause a exception to jump into panic function */
|
abort();
|
||||||
*p = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode,
|
signed portBASE_TYPE xTaskGenericCreate(TaskFunction_t pxTaskCode,
|
||||||
|
@ -125,5 +125,9 @@ void _exit(int status)
|
|||||||
void abort(void)
|
void abort(void)
|
||||||
{
|
{
|
||||||
ESP_LOGE("ABORT","Error found and abort!");
|
ESP_LOGE("ABORT","Error found and abort!");
|
||||||
while(1);
|
|
||||||
|
/* cause a exception to jump into panic function */
|
||||||
|
while (1) {
|
||||||
|
*((int *)NULL) = 0;
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user