mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
bootloader: erasing -> preparing
This commit is contained in:
parent
83ae01e751
commit
988209ab7d
@ -363,12 +363,12 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep)
|
|||||||
flash_unlock();
|
flash_unlock();
|
||||||
// erase metadata area
|
// erase metadata area
|
||||||
for (int i = FLASH_META_SECTOR_FIRST; i <= FLASH_META_SECTOR_LAST; i++) {
|
for (int i = FLASH_META_SECTOR_FIRST; i <= FLASH_META_SECTOR_LAST; i++) {
|
||||||
layoutProgress("ERASING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
layoutProgress("PREPARING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
||||||
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
||||||
}
|
}
|
||||||
// erase code area
|
// erase code area
|
||||||
for (int i = FLASH_CODE_SECTOR_FIRST; i <= FLASH_CODE_SECTOR_LAST; i++) {
|
for (int i = FLASH_CODE_SECTOR_FIRST; i <= FLASH_CODE_SECTOR_LAST; i++) {
|
||||||
layoutProgress("ERASING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
layoutProgress("PREPARING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
||||||
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
||||||
}
|
}
|
||||||
flash_wait_for_last_operation();
|
flash_wait_for_last_operation();
|
||||||
@ -488,12 +488,12 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep)
|
|||||||
flash_unlock();
|
flash_unlock();
|
||||||
// erase metadata area
|
// erase metadata area
|
||||||
for (int i = FLASH_META_SECTOR_FIRST; i <= FLASH_META_SECTOR_LAST; i++) {
|
for (int i = FLASH_META_SECTOR_FIRST; i <= FLASH_META_SECTOR_LAST; i++) {
|
||||||
layoutProgress("ERASING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
layoutProgress("PREPARING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
||||||
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
||||||
}
|
}
|
||||||
// erase code area
|
// erase code area
|
||||||
for (int i = FLASH_CODE_SECTOR_FIRST; i <= FLASH_CODE_SECTOR_LAST; i++) {
|
for (int i = FLASH_CODE_SECTOR_FIRST; i <= FLASH_CODE_SECTOR_LAST; i++) {
|
||||||
layoutProgress("ERASING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
layoutProgress("PREPARING ... Please wait", 1000 * (i - FLASH_META_SECTOR_FIRST) / (FLASH_CODE_SECTOR_LAST - FLASH_META_SECTOR_FIRST));
|
||||||
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
flash_erase_sector(i, FLASH_CR_PROGRAM_X32);
|
||||||
}
|
}
|
||||||
layoutProgress("INSTALLING ... Please wait", 0);
|
layoutProgress("INSTALLING ... Please wait", 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user