mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-09 15:00:58 +00:00
feat(core/bootloader): emulator can now show custom error screens
This commit is contained in:
parent
2dd44786d5
commit
6d434122f7
@ -36,6 +36,7 @@ void ui_screen_boot(const vendor_header* const vhdr,
|
|||||||
const image_header* const hdr);
|
const image_header* const hdr);
|
||||||
void ui_screen_boot_wait(int wait_seconds);
|
void ui_screen_boot_wait(int wait_seconds);
|
||||||
void ui_screen_boot_click(void);
|
void ui_screen_boot_click(void);
|
||||||
|
void ui_click(void);
|
||||||
|
|
||||||
void ui_screen_welcome_model(void);
|
void ui_screen_welcome_model(void);
|
||||||
void ui_screen_welcome(void);
|
void ui_screen_welcome(void);
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "emulator.h"
|
|
||||||
#include "flash.h"
|
#include "flash.h"
|
||||||
#include "rust_ui.h"
|
#include "rust_ui.h"
|
||||||
|
#include "bootui.h"
|
||||||
|
#include "emulator.h"
|
||||||
|
|
||||||
uint8_t *FIRMWARE_START = 0;
|
uint8_t *FIRMWARE_START = 0;
|
||||||
uint32_t stay_in_bootloader_flag;
|
uint32_t stay_in_bootloader_flag;
|
||||||
@ -18,9 +19,16 @@ int main(int argc, char **argv) {
|
|||||||
FIRMWARE_START =
|
FIRMWARE_START =
|
||||||
(uint8_t *)flash_get_address(FLASH_SECTOR_FIRMWARE_START, 0, 0);
|
(uint8_t *)flash_get_address(FLASH_SECTOR_FIRMWARE_START, 0, 0);
|
||||||
|
|
||||||
if (argc > 1 && argv[1][0] == 's') {
|
if (argc == 2 && argv[1][0] == 's') {
|
||||||
// Run the firmware
|
// Run the firmware
|
||||||
stay_in_bootloader_flag = STAY_IN_BOOTLOADER_FLAG;
|
stay_in_bootloader_flag = STAY_IN_BOOTLOADER_FLAG;
|
||||||
|
} else if (argc == 4) {
|
||||||
|
display_init();
|
||||||
|
display_backlight(180);
|
||||||
|
screen_fatal_error_rust(argv[1], argv[2], argv[3]);
|
||||||
|
display_refresh();
|
||||||
|
ui_click();
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int retval = bootloader_main();
|
int retval = bootloader_main();
|
||||||
|
Loading…
Reference in New Issue
Block a user