3

The process to transfer a .UF2 image of an application onto a Raspberry PICO device is well-documented and works as advertised.

Are there ways to flash multiple files (or contents, since there is no file system on the PICO) and then read them from the application that was flashed along with it?

I need to have my app (the .UF2 image) read the data that I am supplying in the additional files along with it.

Is this even possible using the C++ SDK tools, and how would one go about it? I am looking for something simpler than using a file system on the PICO (like LittleFS).

Shripathi Kamath
  • 310
  • 3
  • 10
  • 1
    See [Pico API Documentation - hardware_flash](https://raspberrypi.github.io/pico-sdk-doxygen/group__hardware__flash.html) specifically the `void flash_range_program (uint32_t flash_offs, const uint8_t *data, size_t count)` function. – David C. Rankin Dec 15 '22 at 06:33
  • That helps modify the flash from the Pico. I am interested in first downloading the content on to the flash from a host. Like a boot image. – Shripathi Kamath Dec 15 '22 at 06:59
  • 1
    That essentially is using the Pico like a usb drive -- but having to know exactly where to perform the binary write to it. Other than researching how to manually flash, I'd start with how to recovery from it before attempting. I think that is likely an easy way to screw things up to the point of needed to reflash the firmware. – David C. Rankin Dec 15 '22 at 23:34

1 Answers1

1

Littlefs is a library for adding file system support to embedded devices. It was originally developed by ARM and there are ports for both arduino and baremetal to interface directly with the RP2040. It is incredibly well documented although it does have some limitations(i.e. file names shorter than 31 characters). Here is probably a good place to start if you are using the Arduino IDE.

Dacoolinus
  • 388
  • 1
  • 10