From 2872de1e03fcf56c1e01f390191e16b1b6fcba09 Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Thu, 28 Nov 2019 19:26:41 +0800 Subject: [PATCH] fix(newlib): fix abort function cause critical error --- components/newlib/newlib/port/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/newlib/newlib/port/syscall.c b/components/newlib/newlib/port/syscall.c index 99216d32..60f8d5db 100644 --- a/components/newlib/newlib/port/syscall.c +++ b/components/newlib/newlib/port/syscall.c @@ -158,7 +158,9 @@ void _free_r(struct _reent *r, void *ptr) void abort(void) { - ESP_LOGE("ABORT","Error found and abort!"); +#ifndef CONFIG_ESP_PANIC_SILENT_REBOOT + ets_printf("abort() was called at PC %p on core %d\r\n", __builtin_return_address(0) - 3, xPortGetCoreID()); +#endif /* cause a exception to jump into panic function */ while (1) {