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
flash: unable to flash UF2 device using Fedora #954
Comments
What is the location of the PYBADGEBOOT directory? You can get it with the |
As a temporary workaround, you can write it manually to the device. For example:
|
The location of this drive on Fedora is not the same as Debians. We ran into this exact problem recently at our workshop at SCaLE. I think someone was going to submit a PR that added the correct path. |
According to the Files app, the directory is: |
Thanks @aykevl !
This workaround appears to work (note the path below): |
@deadprogram : Does the PR need to be submitted here or somewhere at Fedora? This looks like a tinygo building / flash issue. Does issue 954 serve as notice? :) |
Not sure if this related, but I get this new error trying to flash the name badge code: main.gomain.go:25:22: SPI1_MISO_PIN not declared by package machine Changing the code from MISO to MIS0 doesn't appear to help.... EDIT: I'm finding commenting that line by prepending a "//" (no quotes) appears to get the ball rolling. Yay! |
Regarding the path to the badge for flashing, that would be a PR here, please. Regarding the SPI1 compile error, which program are you trying to build? |
The relevant code is here if you want to make a PR: https://github.com/tinygo-org/tinygo/blob/master/main.go#L483 |
Experiencing the same issue on Arch. The path for drives on Arch is |
Another workaround is creating a symlink, like so: |
Is there someone who would make a PR to fix this? The relevant code is here: Lines 498 to 499 in a9ba6eb
It doesn't need any special knowledge, but is much easier done when you're actually running Fedora or Arch (which I don't). |
I will try to make a PR. Should be ready soon if I don't encounter any issues. |
I've just created a PR that seems to fix it. Only tested on Arch, not Fedora or Debian. |
I accidentally made my previous PR against release. Sorry about that. Anyway, I've created a new PR and changed it to work with pre-1.16 versions. If someone could look at it, and test it on Debian and Fedora, that would be much appreciated. Thank you. |
Distro: Fedora 31
tinygo version: 0.11.0
$ ls -al /dev/ttyACM0
crw-rw----. 1 root dialout 166, 0 Mar 14 2020 /dev/ttyACM0
$ groups
my_username wheel dialout docker
$ tinygo flash -target=pybadge main.go
error: failed to flash /tmp/tinygo_xxxxxx_/main.uf2: unable to locate UF2 device: PYBADGEBOOT
$ id -a
uid=xxxx(my_username) gid=xxxx(my_username) groups=xxxx(my_username),10(wheel),xx(dialout),971(docker) context=unconfined_(etc. etc.)
I've also tried:
$ tinygo flash -port=/dev/ttyACM0 -target=pybadge main.go
However...
I can easily copy UF2 files directly to the PYBADGEBOOT over USB with no issues.
How can I get tinygo flashing to work on Fedora 31?
The text was updated successfully, but these errors were encountered: