1

I have a Raspberry Pi Pico connected to a Raspberry Pi 4 into which I am working with SSH. I succeeded into loading the blink LED example by drag-and-drop the binary file. Is it possible to do this without the GUI? How?

Initially I thought it was just copying the binary into the Pi Pico, however, something else is going on because the Pi Pico to which I loaded the blink LED binary now shows up with this content in my PC:

RPI-RP2$ l total 8.0K -r--r--r--. 1 msenger msenger 241 Sep 5 2008 INDEX.HTM -r--r--r--. 1 msenger msenger 62 Sep 5 2008 INFO_UF2.TXT 

So it is not just copy paste. I guess.

2
  • I’m pretty sure you need to manually press the reset button. Commented Sep 18, 2024 at 6:23
  • Also note that for running new MicroPython Python files, you can just use ampy to hot reload code: stackoverflow.com/questions/74150782/… Note however that this only works because MicroPython's firmware supports it. It is also possible with the C SDK however, but you also need to enable support from the previously firmware code: youtube.com/watch?v=tRXLxrtfU_s Commented Jul 27 at 16:57

1 Answer 1

1

I don't think you can flash a Pi pico directly with a .bin file, but you can :

  • Connect to it in USB and press the "BOOTSEL" button while powering it on, the disk storage will pop up on your laptop. You can release the button and upload your .uf2 file. As @goldilocks said in comments, it is completely doable without using GUI.
  • Connect to it in SWD and use a program like openOCD to flash your pi using your .elf file.

Example for USB

Example for SWD

Flashing with USB is easier, but SWD might be a good option if you don't want to use the GUI.

3
  • 2
    "in this case, you must use the GUI" -> No, it appears as normal USB storage device which can be mounted and files copied to/from it by normal means, GUI or otherwise. You can also use picotool for this purpose, see Appendix B in datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf Commented Sep 20, 2024 at 13:04
  • @goldilocks You are right, I've updated my answer accordingly Commented Sep 20, 2024 at 13:16
  • Yes, actually I found out that after cp binary.uf2 /media/$USER/RPI-RP2/ it is programmed. Commented Sep 20, 2024 at 14:00

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.