MobiFlight-Connector icon indicating copy to clipboard operation
MobiFlight-Connector copied to clipboard

Proof of concept flashing Picos via copy to mounted USB drive.

Open neilenns opened this issue 2 years ago • 2 comments

This is just a proof of concept illustrating the possibility of flashing Picos directly from MobiFlight by copying the firmware over with a simple file copy to the removable disk.

It is based on the approach used by PlatformIO to copy to Picos without using picotool. Thanks to @elral for digging in to how PlatformIO is now doing this.

I'm amazed at how simple this was to get working. The code to force a COM reset is already there for Arduinos and gets reused as-is. Adding a new block to the board config file with USB flash settings is the trigger to run the new code flow. The new code is straightforward as well.

I still can't believe this actually works and took me less than an hour to write!

neilenns avatar Sep 04 '22 01:09 neilenns

Before this is ready for prime time there's some testing that has to be done:

  1. Verify Arduino flashing still works.
  2. Verify a USB stick called RPI-RP2 without an INFO-UF2.TXT file present fails (as it should)
  3. Verify flashing when more than one Pico is connected and all of them need updates

neilenns avatar Sep 04 '22 02:09 neilenns

Great! I will test it also with more than one Pico.

Ralf

elral avatar Sep 04 '22 05:09 elral

Closing this since it was just a proof of concept. Can always do it again when we decide we really want to support Pico.

neilenns avatar Nov 16 '22 20:11 neilenns

This needs to be updated to handle the new firmware reset flow.

neilenns avatar Dec 08 '22 17:12 neilenns

Will make a new PR

neilenns avatar Dec 08 '22 21:12 neilenns