Closed luiswirth closed 3 years ago
I tried debugging it myself and just noticed, that the pico has to be mounted.
Is it possible to automatically mount and unmount?
Did you find a workaround for this? I'm running into it and haven't had luck finding a solution.
@konk3r Meanwhile I'm using picoprobe (a second pico that serves as a communication bridge between the computer and the actual pico, that can flash).
Before that I just used a small script that does the mounting for me.
#!/bin/sh
sudo mount -o uid=1000,gid=1000 /dev/pico /mnt/pico
elf2uf2-rs $1
cp $1.uf2 /mnt/pico
sudo umount /mnt/pico
And in my .cargo/config
I have
runner = "script/pico-load-ocd"
:) for anyone else who's stuck on this and see's "..that the pico has to be mounted" and spends an inordinate amount of time debugging the underlying system disks rust library to see that /proc/mounts is where the lookup happens before realising in a moment of utter stupid realisation what they've been doing, I'll shortcut it for you.
On Manjaro elf2uf2-rs looks up the mounted pico from /proc/mounts. The pico will not appear in there unless you access the automount.
Power the pico in BOOTSEL mode, then open the presented RPI-RP2
drive (so you can then see INFO_UF2.TXT
). It's this that causes /proc/mounts to get populated with /dev/SDB1
or whatever it is on your machine.
elf2ufs-rs will then work :)
...I spent way too long on this, I'm still chuckling.
:) for anyone else who's stuck on this and see's "..that the pico has to be mounted" and spends an inordinate amount of time debugging the underlying system disks rust library to see that /proc/mounts is where the lookup happens before realising in a moment of utter stupid realisation what they've been doing, I'll shortcut it for you.
On Manjaro elf2uf2-rs looks up the mounted pico from /proc/mounts. The pico will not appear in there unless you access the automount.
Power the pico in BOOTSEL mode, then open the presented
RPI-RP2
drive (so you can then seeINFO_UF2.TXT
). It's this that causes /proc/mounts to get populated with/dev/SDB1
or whatever it is on your machine.elf2ufs-rs will then work :)
...I spent way too long on this, I'm still chuckling.
@headstrongsolutions This makes sense! But this means, you'll remove INFO_UF2.TXT
every time you put Rust code into Pico. And you'll have to repeat the entire process you described every time you change that code.
The
--deploy
option doesn't work on my system.Unable to find mounted pico
I'm on arch linux and
lsusb
does list the pico: