Custom Filesystem Builder

Hi Guys!
I’m using PlatformIO with ESP-IDF. I wrote a simple custom filesystem (sth like romfs), I have a builder for it, but whatever I do, I can’t replace the original littlefs builder and it gets executed before my own builder does (added a Post hook). It didn’t bother me until recently (I overwrite the output file anyway), when littlefs builder stareted failing: files are bigger than the partition, but that is fine for me since I compress them in my builder, but littlefs builder can’t handle it…

And I would like stuff to still be integrated with platform IO…

Any help? :slight_smile:

Either how replace the builder, or how to add my custom target (that would still work with ‘upload’),

Avoid replacing the LittleFS builder directly. Create a custom PlatformIO target instead. PlatformIO supports custom targets through AddCustomTarget(). Your target can build the compressed filesystem image. It can depend on your firmware build. This avoids LittleFS’s partition-size validation entirely.