add more ota_err_code support for ota bootloader

This commit is contained in:
mculover666
2020-06-24 15:46:04 +08:00
parent 70b4bb126a
commit 142d3ebf7b
9 changed files with 62 additions and 41 deletions

View File

@@ -1172,7 +1172,7 @@
<Group>
<GroupName>ota_recovery</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>

View File

@@ -55,17 +55,17 @@ int main(void)
return -1;
}
#if 1
if (ota_recovery_xip() != 0) {
printf("recovery failed!\n");
#if 0
if ((ret = ota_recovery_xip()) != OTA_ERR_NONE) {
printf("recovery failed, OTA errcode = %d!\r\n", ret);
} else {
printf("recovery successfully!\n");
printf("recovery successfully!\r\n");
}
#else
if (ota_recovery() != 0) {
printf("recovery failed!\n");
if ((ret = ota_recovery()) != OTA_ERR_NONE) {
printf("recovery failed, OTA errcode = %d!\r\n", ret);
} else {
printf("recovery successfully!\n");
printf("recovery successfully!\r\n");
}
#endif