Here's the source of the error
# ReadFile(hFile,(void *)(txBuf+8),fileSize,&txBufSize,NULL);
# if(txBufSize!=fileSize)
# {
# EB_Printf(TEXT("[ERROR:File Size Error]\n") );
# return;
# }
So it looks like ReadFile isn't reading it all in in one go, and so the
error is triggered. I'm guessing this could be improved to try to read the
file again
Anyway simple solution, move the .img file into the virtual machine, and it
works.
Just so people know if they come across the same problem.
该问题我以为是bootloader的问题呢,结果找半天bootloader的代码也没有发现“error:file size error”这句。然后到网上搜,最后有网友遇到过类似问题,告诉大家,原来是虚拟机使用共享文件夹造成的。我想烧写的文件在共享文件夹内,因此打印出了这个错误。结果我把文件从共享文件夹中拷贝到虚拟机中,也就是没有用共享文件夹,问题就解决了。