ARMmbed / DAPLink

https://daplink.io
Apache License 2.0
2.31k stars 976 forks source link

macOS 15 Sequoia finder drag&drop flashing fails #1083

Open microbit-carlos opened 6 days ago

microbit-carlos commented 6 days ago

Not quite the same, but similar to:

There has been reports of issues flashing in macOS 15 Sequoia via finder.

Some things we've noticed so far:

Issue description

Initial findings

I've done an initial test by printing some vfs data to serial during the file transfer. I'll need to do a better capture using RTT next.

With this initial run, we can see that the captured flashing failures are not caused due to out-of-order blocks, but because the OS now sends continuous file blocks to non-continuous fs sectors (the fs is configured with 512 byte sectors).

For example, in the serial_0.txt log we can see:

fabianhugo commented 1 day ago

I am seeing something very similar on Ubuntu 22.04: uname -a shows: Linux hugoUbu20 6.8.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Copying of universal hex often fails with error 504 and the fail.txt reads:

error: The transfer timed out.
type: transient, user

Around 3 of 4 file transfer fail. Using cp or rsync in the terminal do also not improve the behavior. And WebUSB is not affected as well.

One way for me to tell that the copying failed is to check the contents of the mass storage. If the hex is visible there, it failed. grafik

martinwork commented 20 hours ago

@fabianhugo For Linux, this UDEV rules file 99-microbit-udisks.zip can help by adding the "sync" option to MICROBIT drives.

To install...

Connect micro:bit and check current options: mount | grep MICROBIT

Unzip 99-microbit-udisks.zip, and copy the rules file to the udev rules.d folder. For example sudo cp 99-microbit-udisks.rules /etc/udev/rules.d

Check it has the same owner, group and permissions as other rules files. ls -l /etc/udev/rules.d

Restart UDEV. sudo udevadm control --reload-rules ; sudo udevadm trigger

Disconnect and reconnect micro:bit then check what options are in use now. mount | grep MICROBIT

The only difference should be the addition of "sync".

To uninstall, delete 99-microbit-udisks.rules from the rules.d folder.