From 34e7b67d3c5882ac2078a87bbeb2ab5d09e6717a Mon Sep 17 00:00:00 2001 From: mux Date: Sat, 14 Jun 2014 14:41:11 +0200 Subject: [PATCH] Add __assert_func * issue #692 --- stmhal/main.c | 6 ++++++ 1 file changed, 6 insertions(+) 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;