Fix WINC's firmware_verify.

This commit is contained in:
iabdalkader 2016-04-05 23:40:09 +02:00
parent 749cd96e0c
commit 6addddbbc7

View File

@ -97,13 +97,13 @@ int verify_firmware()
if (programmer_read_firmware_image(flash_buf, offset, bytes) != M2M_SUCCESS) { if (programmer_read_firmware_image(flash_buf, offset, bytes) != M2M_SUCCESS) {
printf("verify_firmware: read access failed on firmware section!\r\n"); printf("verify_firmware: read access failed on firmware section!\r\n");
return M2M_ERR_FAIL; goto error;
} }
for (int i=0; i<bytes; i++) { for (int i=0; i<bytes; i++) {
if (flash_buf[i] != file_buf[i]) { if (flash_buf[i] != file_buf[i]) {
printf("verify_firmware: verification failed! offset:%d flash:%x file:%x\n", i, flash_buf[i], file_buf[i]); printf("verify_firmware: verification failed! offset:%d flash:%x file:%x\n", offset+i, flash_buf[i], file_buf[i]);
return M2M_ERR_FAIL; goto error;
} }
} }