summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/main.c
diff options
context:
space:
mode:
authormux <freelancer.c@gmail.com>2014-06-14 14:41:11 +0200
committermux <freelancer.c@gmail.com>2014-06-14 14:41:11 +0200
commit34e7b67d3c5882ac2078a87bbeb2ab5d09e6717a (patch)
tree1fc330e06af5d71e64d271fe706f3c3289f3a334 /stmhal/main.c
parent8340c4838948876a4e477556beaed79e59e5e9b4 (diff)
downloadmicropython-34e7b67d3c5882ac2078a87bbeb2ab5d09e6717a.tar.gz
micropython-34e7b67d3c5882ac2078a87bbeb2ab5d09e6717a.zip
Add __assert_func
* issue #692
Diffstat (limited to 'stmhal/main.c')
-rw-r--r--stmhal/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index 41ebaf3bb5..3434f3ea58 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -115,6 +115,12 @@ void nlr_jump_fail(void *val) {
__fatal_error("");
}
+void __assert_func(const char *file, int line, const char *func, const char *expr) {
+ (void)func;
+ printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
+ __fatal_error("");
+}
+
STATIC mp_obj_t pyb_config_source_dir = MP_OBJ_NULL;
STATIC mp_obj_t pyb_config_main = MP_OBJ_NULL;
STATIC mp_obj_t pyb_config_usb_mode = MP_OBJ_NULL;