mirror of
https://github.com/sharkcz/rkdeveloptool.git
synced 2024-11-22 14:06:47 +01:00
solve the issue that erase flash doesn't work
Signed-off-by: liuyi <liuyi@rock-chips.com>
This commit is contained in:
parent
6ae612bebc
commit
6502326d4d
12
main.cpp
12
main.cpp
@ -1927,6 +1927,18 @@ bool erase_flash(STRUCT_RKDEVICE_DESC &dev)
|
||||
pDevice->CallBackPointer = ProgressInfoProc;
|
||||
|
||||
printf("Starting to erase flash...\r\n");
|
||||
bRet = pDevice->GetFlashInfo();
|
||||
if (!bRet) {
|
||||
if (pDevice)
|
||||
delete pDevice;
|
||||
if (pScan)
|
||||
delete pScan;
|
||||
ERROR_COLOR_ATTR;
|
||||
printf("Getting flash info from device failed!");
|
||||
NORMAL_COLOR_ATTR;
|
||||
printf("\r\n");
|
||||
return bSuccess;
|
||||
}
|
||||
iRet = pDevice->EraseAllBlocks();
|
||||
if (pDevice)
|
||||
delete pDevice;
|
||||
|
Loading…
Reference in New Issue
Block a user