|
|
@@ -366,7 +366,6 @@ static int MediaUpdateMCU(const char *ufile, int filetype)
|
|
|
uint32_t filesize;
|
|
|
MailboxUpdateFrame tx_frame = {0};
|
|
|
MailboxUpdateFrame *rx_frame = NULL;
|
|
|
- uint32_t ddr_crc = 0, flash_crc = 0;
|
|
|
mb_rxmsg_t msg = {0};
|
|
|
|
|
|
fp = ff_fopen(ufile, "rb");
|
|
|
@@ -376,7 +375,7 @@ static int MediaUpdateMCU(const char *ufile, int filetype)
|
|
|
}
|
|
|
|
|
|
leftsize = filesize = ff_filelength(fp);
|
|
|
- if (filesize > DDR_MEDIA_USE_ADDR) {
|
|
|
+ if (filesize > DDR_MEDIA_USE_SIZE) {
|
|
|
printf("The file is too large, not enough space to save.\n");
|
|
|
goto MediaUpdateEnd;
|
|
|
}
|
|
|
@@ -667,7 +666,7 @@ static int burn_update_file(int filetype, const char *ufile, size_t fileoffset,
|
|
|
#ifdef UPDATE_PROGRESS_SUPPORT
|
|
|
if (show_progress) {
|
|
|
upfile_left_size -= rwsize;
|
|
|
- update_progress_set((upfile_total_size - upfile_left_size) * 100 / upfile_total_size);
|
|
|
+ update_progress_set(((u64)upfile_total_size - upfile_left_size) * 100 / upfile_total_size);
|
|
|
}
|
|
|
#endif
|
|
|
if (!show_progress) {
|