diff --git a/components/freertos/port/esp8266/include/freertos/portmacro.h b/components/freertos/port/esp8266/include/freertos/portmacro.h index d04b4558..0c1ad695 100644 --- a/components/freertos/port/esp8266/include/freertos/portmacro.h +++ b/components/freertos/port/esp8266/include/freertos/portmacro.h @@ -167,6 +167,8 @@ void PortEnableInt_NoNest( void ); #define portENTER_CRITICAL() vPortEnterCritical() #define portEXIT_CRITICAL() vPortExitCritical() +#define xPortGetCoreID() 0 + // no need to disable/enable lvl1 isr again in ISR //#define portSET_INTERRUPT_MASK_FROM_ISR() PortDisableInt_NoNest() //#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) PortEnableInt_NoNest() diff --git a/components/newlib/newlib/port/syscall.c b/components/newlib/newlib/port/syscall.c index 29eaacd2..9c0145b8 100644 --- a/components/newlib/newlib/port/syscall.c +++ b/components/newlib/newlib/port/syscall.c @@ -135,6 +135,10 @@ void _exit(int status) void abort(void) { - ESP_LOGE("ABORT","Error found and abort!"); - while(1); + ets_printf("abort() was called at PC %p on core %d\r\n", __builtin_return_address(0) - 3, xPortGetCoreID()); + + /* cause a exception to jump into panic function */ + while (1) { + *((int *)NULL) = 0; + } } \ No newline at end of file