You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ended up solving my own problem, but the solution was non-intuitive enough that I think it's worth posting in the discussion in case anyone else comes across it...
I'm using the pico in a lab class I'll be teaching in a few weeks. The students don't need to write any code themselves (although they could hack around if they want), but they do need to install code I've written. One way we could accomplish this is for them to install arduino, add the arduino-pico board, download the appropriate libraries, then compile the code and flash it using the arduino environment. This is certainly possible, but a little messy.
What I would like to do is have them mount the pico as a USB drive and copy the software onto it directly ( in analogy to how micropython is installed via dragging and dropping a uf2 file: https://micropython.org/download/rp2-pico/). When I compile for the pico, one of the last status messages is "converting to uf2, output size: ..." but I couldn't locate this intermediate file.
I realized that the uf2 file was probably stored in the same place as the .hex files would be stored for an older avr microcontroller. Using the google, I found advice from sparkfun:
Edit the arduino preferences text file by adding the line
build.path=C:\arduino-output
(or wherever you want)
to cause the intermediate files to show up in a non-cryptic location
After doing this, compile the code. The uf2 will be in the arduino-output folder with the name
sketchname.ino.uf2
Dragging and dropping this onto the rpi drive programs the device and causes a reboot.
A couple of things to note:
Each compilation deletes the previous contents of the build folder, so make sure to copy the uf2 somewhere else to preserve it.
When I compile, I now get a message "couldn't deeply cahe core build: Re1: Running normal build of the core..." It does not seem to cause an error.
PS: Thanks for writing this library. It's been a gamechanger for me.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I ended up solving my own problem, but the solution was non-intuitive enough that I think it's worth posting in the discussion in case anyone else comes across it...
I'm using the pico in a lab class I'll be teaching in a few weeks. The students don't need to write any code themselves (although they could hack around if they want), but they do need to install code I've written. One way we could accomplish this is for them to install arduino, add the arduino-pico board, download the appropriate libraries, then compile the code and flash it using the arduino environment. This is certainly possible, but a little messy.
What I would like to do is have them mount the pico as a USB drive and copy the software onto it directly ( in analogy to how micropython is installed via dragging and dropping a uf2 file: https://micropython.org/download/rp2-pico/). When I compile for the pico, one of the last status messages is "converting to uf2, output size: ..." but I couldn't locate this intermediate file.
I realized that the uf2 file was probably stored in the same place as the .hex files would be stored for an older avr microcontroller. Using the google, I found advice from sparkfun:
Edit the arduino preferences text file by adding the line
build.path=C:\arduino-output
(or wherever you want)
to cause the intermediate files to show up in a non-cryptic location
After doing this, compile the code. The uf2 will be in the arduino-output folder with the name
sketchname.ino.uf2
Dragging and dropping this onto the rpi drive programs the device and causes a reboot.
A couple of things to note:
PS: Thanks for writing this library. It's been a gamechanger for me.
Beta Was this translation helpful? Give feedback.
All reactions