mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
167:e84263d55307
Parent:
160:d5399cc887bb
Child:
186:707f6e361f3e
--- a/platform/mbed_error.c	Thu Jun 08 15:02:37 2017 +0100
+++ b/platform/mbed_error.c	Wed Jun 21 17:46:44 2017 +0100
@@ -23,7 +23,16 @@
 #include <stdio.h>
 #endif
 
+static uint8_t error_in_progress = 0;
+
 WEAK void error(const char* format, ...) {
+
+    // Prevent recursion if error is called again
+    if (error_in_progress) {
+        return;
+    }
+    error_in_progress = 1;
+
 #ifndef NDEBUG
     va_list arg;
     va_start(arg, format);