mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-09 06:50:58 +00:00
modtrezorutils: call __fatal_error on stm
This commit is contained in:
parent
0c060b6d4a
commit
69d7f39b23
@ -7,8 +7,12 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
|
||||||
|
#if defined STM32_HAL_H
|
||||||
|
#include "common.h"
|
||||||
|
#elif defined UNIX
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "py/runtime.h"
|
#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?
|
// TODO: is this the best we can do?
|
||||||
#if defined STM32_HAL_H
|
#if defined STM32_HAL_H
|
||||||
// loop forever
|
__fatal_error("HALT");
|
||||||
for (;;) {}
|
|
||||||
#elif defined UNIX
|
#elif defined UNIX
|
||||||
exit(1);
|
exit(1);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user