How to upload littlefs.bin filesystem from command line

Hi. I know how to upload file system image from the IDE but is there a way to do this from windows command line? I need to distribute new file system images to some users and they dont have access to IDE. I have the littlefs.bin filesystem image file.

I tried turning verbose on in the IDE but all I see is the system building the files system and no detail of commands that are used to upload the image…

This is what i see:

lash size: 2.00MB
Sketch size: 1.50MB
Filesystem size: 0.50MB
Maximium Sketch size: 1568768 EEPROM start: 0x101ff000 Filesystem start: 0x1017f000 Filesystem end: 0x101ff000
Building file system image from ‘data’ directory to .pio\build\pico\littlefs.bin
/data1.dat
/data2.dat
/settings2.json
Looking for upload port…
Using manually specified: D:
Forcing reset using 1200bps open/close on port D:
Delaying a tiny bit…
Uploading .pio\build\pico\littlefs.bin
Loading into Flash: [ ] 0%

OK
Rebooting device…

let me know if anyone knows how to do this via windows command line

Thanks. I found the solution :slight_smile:

use picotool like this:

picotool load --verify littlefs.bin --offset 0x1017f000

The offset you can get from the terminal output when you build. for me since my files system size was set to .5mb with 2mb flash, I got:

Maximium Sketch size: 1568768 EEPROM start: 0x101ff000 Filesystem start: 0x1017f000 Filesystem end: 0x101ff000