nrf5: Updated after merge with master. Updating nlr_jump_fail to call __fatal_error in order to provide a non-returning function call.

This commit is contained in:
Glenn Ruben Bakke 2017-03-07 17:53:10 +01:00
parent fd8f2c36f5
commit 9d2a2d227c
1 changed files with 6 additions and 4 deletions

View File

@ -233,14 +233,16 @@ void HardFault_Handler(void)
#endif
}
void nlr_jump_fail(void *val) {
}
void NORETURN __fatal_error(const char *msg) {
while (1);
}
void nlr_jump_fail(void *val) {
printf("FATAL: uncaught exception %p\n", val);
mp_obj_print_exception(&mp_plat_print, (mp_obj_t)val);
__fatal_error("");
}
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");