summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/main.c')
-rw-r--r--stmhal/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index b74fa73186..7e3c5a7c6d 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -85,7 +85,7 @@ void flash_error(int n) {
led_state(PYB_LED_R2, 0);
}
-void __fatal_error(const char *msg) {
+void NORETURN __fatal_error(const char *msg) {
for (volatile uint delay = 0; delay < 10000000; delay++) {
}
led_state(1, 1);
@@ -115,7 +115,6 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c
(void)func;
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
__fatal_error("");
- while (1);
}
#endif