mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-10-19 12:13:15 +08:00
fix(newlib): fix abort function cause critical error
This commit is contained in:
@@ -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()
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user