Creating and Uploading a Custom Filesystem to ESP32-C3 #12904
-
Hello MicroPython Community! I’m currently working with an ESP32-C3 module and am facing an issue while trying to prepare a binary file for the filesystem pre-loaded with specific files for production use. I've successfully downloaded the default filesystem created by MicroPython and accessed it on a Linux system using the littlefs-tools Python package, with a block size of 4096 and block count of 512. However, when I attempt to create a new filesystem partition on Linux to upload to the ESP32-C3, MicroPython reports a corrupted filesystem with the following message:
The command I’m using to generate the littlefs image file is:
And for uploading the created partition to the device, I use:
Could someone please guide me on the correct procedure to create and upload a filesystem that MicroPython will recognize without errors? Thank you in advance for your assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
PR #8381 seems to have that as a goal. But until that is ready, perhaps this will help: https://github.com/bixb922/freezefs It saves a file structure with subfolders and builds self-mountable archive in a .py file, optionally with compression, to be frozen as bytecode You import the frozen py module and the files appear mounted as a read only file system For read write files, there is an extract option too |
Beta Was this translation helpful? Give feedback.
Hi Pablo,
take a look here : https://github.com/Josverl/vfs_merge
to be transparant - I've not yet tested it with an Esp32 C3.
See
vfs_merge/portboard_disk.md
for the how and where to get the address details for the littlefs partition.