From 569cf70fea944ab19661bee78a64c969cedb3fcc Mon Sep 17 00:00:00 2001 From: Zhang Jun Hao Date: Sat, 23 Jun 2018 18:31:52 +0800 Subject: [PATCH] feat(newlib): Add abort function --- components/newlib/newlib/port/syscall.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/newlib/newlib/port/syscall.c b/components/newlib/newlib/port/syscall.c index cf949856..d0a29931 100644 --- a/components/newlib/newlib/port/syscall.c +++ b/components/newlib/newlib/port/syscall.c @@ -20,6 +20,7 @@ #include "esp8266/eagle_soc.h" #include "esp8266/uart_register.h" #include "FreeRTOS.h" +#include "esp_log.h" #define PANIC_UART 0 @@ -126,3 +127,9 @@ void _exit(int status) { while (1); } + +void abort(void) +{ + ESP_LOGE("ABORT","Error found and abort!"); + while(1); +} \ No newline at end of file