How do I start using ROMFS? #19687
|
This may be a dense question, but there's something I'm clearly missing here I think. 😅 I've been reading up on ROMFS and wanted to start using it on my WROOM-based board (Adafruit's HUZZAH32), but I cannot for the life of me figure out how one actually gets ROMFS enabled, I've come across this page in the wiki here, but that seems to involving needing to build your own MicroPython firmware? It's not enabled by default on any of the standard builds that can be downloaded from the website? |
Replies: 3 comments 4 replies
|
This does seem to be the current situation. I have experimented with it, and it works very well, but enabling it does involve creating a special build. Compared to frozen bytecode, performance is identical. You only need to compile once as against once each time your code changes. Precompiled builds with it enabled would open up the feature to many more users. |
|
I have written a doc page on using RomFS, but decided against adding a full list of individual boards, as that would grow old quick. So searching GitHub for MICROPY_VFS_ROM in .h files is the current best offer 💡Perhaps it is possible to add a romfs flag in the individual |
|
Your firmware must have ROMFS partation. Try If $ mpremote a1 romfs query
ROMFS is not enabled on this deviceHaving romfs partation is not enough, you also need to enable it. Now, firmware built with romfs-partation + MICROPY_VFS_ROM, then, you can, for example: Then: |
Your firmware must have ROMFS partation. Try
If
part.find(1,0x8f)return[]then you have no romfs partation in your flash.Having romfs partation is not enough, you also need to enable it.
Build firmware using custom board
mpconfigboard.hwith:Now, firmware built with romfs-partation + MICROPY_VFS_ROM,
The import path will have
/rom: