1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-30 11:52:34 +00:00

feat(core/prodtest): add reboot to bootloader command

[no changelog]
This commit is contained in:
tychovrahe 2025-05-27 11:31:42 +02:00 committed by TychoVrahe
parent 5c3cf0004e
commit a6fda4d814
2 changed files with 31 additions and 0 deletions

View File

@ -113,6 +113,17 @@ reboot
OK
```
### reboot-to-bootloader
This command initiates device reboot to bootlaoder.
Example:
```
reboot-to-bootloader
OK
```
### boardloader-version
Retrieves the version of the boardloader. The command returns `OK` followed by the version in the format `<major>.<minor>.<patch>`.

View File

@ -36,6 +36,19 @@ static void prodtest_reboot(cli_t* cli) {
reboot_device();
}
static void prodtest_reboot_to_bootloader(cli_t* cli) {
if (cli_arg_count(cli) > 0) {
cli_error_arg_count(cli);
return;
}
cli_ok(cli, "");
// Reboot with a delay to allow the response to be sent
systick_delay_ms(1000);
reboot_to_bootloader();
}
// clang-format off
PRODTEST_CLI_CMD(
@ -45,4 +58,11 @@ PRODTEST_CLI_CMD(
.args = ""
);
PRODTEST_CLI_CMD(
.name = "reboot-to-bootloader",
.func = prodtest_reboot_to_bootloader,
.info = "Reboot the device to bootloader",
.args = ""
);