Verified Commit 9d44017b authored by Rahix's avatar Rahix
Browse files

feat(epicardium): Use panic() for assertion failures



Define `__assert_func()` so a failing `assert()` will trigger a panic.
Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 1536da34
......@@ -61,3 +61,16 @@ void __attribute__((noreturn)) panic(const char *format, ...)
card10_reset();
}
void __attribute__((noreturn)) __assert_func(
const char *file, int line, const char *func, const char *failedexpr
) {
panic("Assertion failure:\n"
" \"%s\"\n"
" failed in \"%s:%d\",\n"
" function: %s()",
failedexpr,
file,
line,
func);
}
Supports Markdown
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