Skip to content
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

Support UF2 drives with space in their name on Linux #4232

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mateusznowakdev
Copy link

I've updated the factory bootloader on one of my Seeed Studio XIAOs to the latest version provided by Adafruit. Their bootloader uses different name for UF2 device, "Seeed XIAO", instead of "Arduino".

Unfortunately, after the update tinygo flash was no longer able to detect the device, even if the board configuration was correct. It looks like the entry in /proc/mounts file uses \040 instead of a , and the findFATMounts function can't handle such a case:

/dev/sda /media/matt/Seeed\040XIAO vfat ...... 0 0
error: failed to flash /tmp/tinygo2815790133/main.uf2: unable to locate any volume: [Arduino,Seeed XIAO]

This PR fixes the issue on Linux. I've tested it on my PC (Debian 12) against dev branch, with both original bootloader and the updated one.

Some devices, such as Seeed Studio XIAO with Adafruit bootloader, use complex names for UF2 device. With this fix applied, /proc/mounts should be parsed correctly
@sago35
Copy link
Member

sago35 commented Apr 17, 2024

Could you please provide the bootloader you've tried?
update) Have you used the following Bootloader?

https://github.com/adafruit/uf2-samdx1/releases/tag/v3.16.0

@mateusznowakdev
Copy link
Author

I've tried both 3.16 (the version you've linked), and the 3.14 (https://github.com/adafruit/uf2-samdx1/releases/tag/v3.14.0). Both versions use "Seeed XIAO" as the device name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants