summaryrefslogtreecommitdiff
path: root/lib/arduino-stub.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arduino-stub.cpp')
-rw-r--r--lib/arduino-stub.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/arduino-stub.cpp b/lib/arduino-stub.cpp
index c130a45..39bd9cc 100644
--- a/lib/arduino-stub.cpp
+++ b/lib/arduino-stub.cpp
@@ -22,6 +22,7 @@
#define ARDUINO_MAIN
#include "Arduino.h"
+#include "stdlib.h"
int atexit(void (* /*func*/ )()) { return 0; }
@@ -1042,4 +1043,21 @@ long map(long x, long in_min, long in_max, long out_min, long out_max)
unsigned int makeWord(unsigned int w) { return w; }
unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; }
-// end WMath.cpp
+
+// ******************
+// this is from Arduino's abi.cpp
+
+extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
+extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
+
+void __cxa_pure_virtual(void) {
+ // We might want to write some diagnostics to uart in this case
+ //std::terminate();
+ abort();
+}
+
+void __cxa_deleted_virtual(void) {
+ // We might want to write some diagnostics to uart in this case
+ //std::terminate();
+ abort();
+}