From 69d7f39b232e46534c166b48b0575e6aa582f8e0 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 10 Apr 2017 19:43:07 +0200 Subject: [PATCH] modtrezorutils: call __fatal_error on stm --- micropython/extmod/modtrezorutils/modtrezorutils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/micropython/extmod/modtrezorutils/modtrezorutils.c b/micropython/extmod/modtrezorutils/modtrezorutils.c index fac08339..f46c29a5 100644 --- a/micropython/extmod/modtrezorutils/modtrezorutils.c +++ b/micropython/extmod/modtrezorutils/modtrezorutils.c @@ -7,8 +7,12 @@ #include #include -#include + +#if defined STM32_HAL_H +#include "common.h" +#elif defined UNIX #include +#endif #include "py/runtime.h" @@ -66,8 +70,7 @@ STATIC mp_obj_t mod_TrezorUtils_halt(size_t n_args, const mp_obj_t *args) { } // TODO: is this the best we can do? #if defined STM32_HAL_H - // loop forever - for (;;) {} + __fatal_error("HALT"); #elif defined UNIX exit(1); #else