-
Notifications
You must be signed in to change notification settings - Fork 464
Windows 10: Error 0x800701B1 when copying UF2 firmware (copy is successful) #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hmm, since I couldn't reproduce this issue with this repo. This issues appeared once, and we fixed it already. I don't remember the detail. Maybe it is specific to 833 or your folk. So I can only help with analyzing and providing information at best. As far as I can tell, windows is not happy with the end of transfer. It will be more useful if you could provide usb capture and/or the usb stack log to see which command it failed to response to. Since this is timing issue, you should use either RTT or SWO as logger to prevent messing with timing. I have done rtt/swo logger on my repo. hathach/tinyusb#367 . You can try to follow that to add retarget for the rtt/swo. PS: a little bit of delay is not that bad, many bootloader uses this as walkaround as well. It doesn't hurt anyone. Although it does hide the issue, it hides it very well that it is not reproducible 😄 |
Normally the finishing task should be enough for status to complete. Too bad, I won't have time to test this out a gain. A simple delay of a few ms when exiting bootloader mode should be OK though. PS: I will just put the racing note to the quote, else I may tempt to revert the order and got myself into loop of debugging :D . It could be Arduino lib issue though, unfortunately, we need to stick to whatever works :D. |
@hathach Yes, I see the problem in hathach/tinyusb@605129e, and if I revert to the previous commit hathach/tinyusb@2caa1ac the problem goes away. So hathach/tinyusb@605129eb6600ffb50ea2d239e0ad78a9636df8e1is where the problem appears. |
Yeah, thanks for testing out. but I don't really have time now to test samd51 + qspi on Arduino again. Maybe later, I put down the note to the code already so that I know what to test when reverting that in the future. |
Thanks for narrowing down the commit! I wonder why nobody else is seeing this. I'll keep the delay for now, since it works around the issue. |
@xobs no problems at all, most usb issues are easier to troubleshoot with a hardware analyzer. The more I think the more it is not right currently. I just create an issue as reminder to revert that commit when I have more time in the future and/or more people having the same issue as this. |
Describe the bug
Windows 10 reports a transfer error after writing the last block. Similar to #46. The transfer is successful.
Set up (please complete the following information)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It shouldn't print an error after copying.
Screenshots

Additional context
This is, admittedly, an extremely hacked-down version of this bootloader located at https://github.com/simmel-project/bootloader. One difference is that we have LTO enabled (
-flto
) which caused issues with the vector table generation and weak symbols. Symbols such asSVC_Handler
were getting stuck as their infinite-loop variants rather than getting overridden.Having said that, everything appears to work just fine, it's just that Windows is doing something like queueing multiple LUNs, and the bootloader looks like it's rebooting after only one LUN is acknowledged.
The workaround I've made in simmel-project/bootloader@037d350 fixes the problem, but doesn't feel right, during board teardown just before USB is disconnected:
The text was updated successfully, but these errors were encountered: