Skip to content
Snippets Groups Projects
Commit 1a5a6d14 authored by Sven Wegener's avatar Sven Wegener Committed by Damien George
Browse files

bare-arm: Add dummy __assert_func and __fatal_error


Required to build bare-arm with debugging.

Signed-off-by: default avatarSven Wegener <sven.wegener@stealer.net>
parent 238ab501
No related branches found
No related tags found
No related merge requests found
...@@ -78,6 +78,17 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open); ...@@ -78,6 +78,17 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);
void nlr_jump_fail(void *val) { void nlr_jump_fail(void *val) {
} }
void NORETURN __fatal_error(const char *msg) {
while (1);
}
#ifndef NDEBUG
void MP_WEAK __assert_func(const char *file, int line, const char *func, const char *expr) {
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
__fatal_error("Assertion failed");
}
#endif
/* /*
int _lseek() {return 0;} int _lseek() {return 0;}
int _read() {return 0;} int _read() {return 0;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment