Skip to content

Windows 10: Error 0x800701B1 when copying UF2 firmware (copy is successful) #120

Closed
@xobs

Description

@xobs

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)

  • Board: Nordic PCA10100
  • OS: Windows 10 1903
  • N/A

To Reproduce
Steps to reproduce the behavior:

  1. Enter bootloader
  2. Copy file

Expected behavior
It shouldn't print an error after copying.

Screenshots
image

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 as SVC_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:

  unsigned int i;
    for (i = 0; i < 100; i++) {
      tud_task();
      NRFX_DELAY_MS(1);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions