summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--lib/embed/abort_.c5
-rw-r--r--py/py.mk1
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/embed/abort_.c b/lib/embed/abort_.c
new file mode 100644
index 0000000000..b54d08f2c9
--- /dev/null
+++ b/lib/embed/abort_.c
@@ -0,0 +1,5 @@
+#include <py/runtime.h>
+
+void abort_(void) {
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "abort() called"));
+}
diff --git a/py/py.mk b/py/py.mk
index 6781504293..948d7a67f3 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -221,6 +221,7 @@ PY_O_BASENAME = \
../extmod/vfs_fat_lexer.o \
../extmod/vfs_fat_misc.o \
../extmod/moduos_dupterm.o \
+ ../lib/embed/abort_.o \
# prepend the build destination prefix to the py object files
PY_O = $(addprefix $(PY_BUILD)/, $(PY_O_BASENAME))