Commit 812025bd authored by Damien George's avatar Damien George
Browse files

Merge pull request #693 from iabdalkader/assert

Add __assert_func
parents e3cfc0d3 5f6f47a6
......@@ -115,6 +115,15 @@ void nlr_jump_fail(void *val) {
__fatal_error("");
}
#ifndef NDEBUG
void __attribute__((weak))
__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("");
}
#endif
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment