tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

tinygo flash may not work on Sequoia (macOS 15)

Open Senoue opened this issue 1 year ago • 4 comments

Hi. I wonder if tinygo flash can't be used on Sequoia (macOS 15). In my case,

failed to flash /var/folders/m9/xxxx/T/xxx/main.uf2: unable to locate any volume: [RPI-RP2]

Is everyone okay?

Senoue avatar Oct 12 '24 06:10 Senoue

sorry. It was macOS 15 instead of 18

Senoue avatar Oct 15 '24 01:10 Senoue

The error is being output from here, and we can predict that the cause lies in findFATMounts(). Since I don't have a macOS system, I need someone's help.

https://github.com/tinygo-org/tinygo/blob/v0.33.0/main.go#L994-L1018

sago35 avatar Oct 16 '24 14:10 sago35

I have MacOS (though I don't use it much) but am not yet on Sequoia. Kinda hesitant to upgrade, am afraid it will break stuff (last upgrade didn't exactly go very smoothly).

aykevl avatar Oct 16 '24 14:10 aykevl

Thank you, when I checked the mount point on Sequoia, it was mounted as NO NAME in /Volumes, so I added NO NAME to targets/rp2040.json

"msd-volume-name": ["RPI-RP2", "NO NAME"],

I found out that tinygo flash can be done!

Senoue avatar Oct 17 '24 01:10 Senoue

Is this true for all Sequoia users?

deadprogram avatar Dec 02 '24 13:12 deadprogram

I had the same problem with two Macs and a friend's environment.

Senoue avatar Dec 03 '24 00:12 Senoue

I have the issue as well

I installed tinygo as a brew package, and I'm not sure where I can find the "targets/rp2040.json" file with this mean of installation

Can you give a bit more details on how you solved it @Senoue?

I'll try to fix it myself with the information you (kindly) gave in the meantime and report if I find on my own :)

zwindler avatar Jan 31 '25 09:01 zwindler

Ok, found it. For future readers

When you install with homebrew, the config file is here

/opt/homebrew/Cellar/tinygo/0.35.0/targets

(Replace 0.35.0 with your version)

And also don't forget to read "Additional Requirements for Microcontrollers" from https://tinygo.org/getting-started/install/macos, or else the rpi2040 will unmount (with an error message)

I still have the issue though, but I'm progressing xD

failed to flash /var/folders/dr/xxx/T/tinygo12345/main.uf2: unable to locate any volume: [RPI-RP2,NO NAME]

zwindler avatar Jan 31 '25 09:01 zwindler

/opt/homebrew/Cellar/tinygo/0.35.0/targets

You can find this location by running tinygo env or tinygo env TINYGOROOT.

failed to flash /var/folders/dr/xxx/T/tinygo12345/main.uf2: unable to locate any volume: [RPI-RP2,NO NAME]

For the rp2040 target, the first flash must always be done in bootloader mode.
So, press and hold the BOOTSEL button while resetting, then run tinygo flash.

sago35 avatar Feb 01 '25 06:02 sago35

I’ve also been struggling with the same issue from time to time. Right now, I’m looking into possible solutions with help from @sago35. I might even be able to submit a fix as a pull request…?

mi-bear avatar Mar 23 '25 03:03 mi-bear

Closing since I think this was addressed on the most recent release. Please reopen if needed. Thank you everyone!

deadprogram avatar Aug 14 '25 08:08 deadprogram