At the time the Storage module didn't handle multiple files well so @Wilberforce wanted wanted a way to expose it, but I believe doing so uses FatFS so it can't be used for other stuff (at least in the current implementation).
Personally I'd like to remove FLASHFS totally now. I don't know what others think but IMO it's a bit confusing having two different filesystems, one of which appears in the IDE one of which doesn't. For instance the second post on the forum right now is https://forum.espruino.com/conversations/400842/#comment17584054 where this exact thing has happened
We could remove FlashFS and change the partitions so we have a great big area for Storage - and because of the way Storage stores data it's all memory-mapped, so if you write something to it (for example an image) it can be used in Espruino straight from Flash without ever loading it into RAM.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think you need
FILESYSTEM
but notFLASHFS
.FLASHFS
was added in https://github.com/espruino/Espruino/commit/a167bd3eeb3fcdd3667562a96e8a8aba44e68d93to allow some of the flash memory to be used by turning it into a FatFS filesystem.
At the time the
Storage
module didn't handle multiple files well so @Wilberforce wanted wanted a way to expose it, but I believe doing so uses FatFS so it can't be used for other stuff (at least in the current implementation).Personally I'd like to remove FLASHFS totally now. I don't know what others think but IMO it's a bit confusing having two different filesystems, one of which appears in the IDE one of which doesn't. For instance the second post on the forum right now is https://forum.espruino.com/conversations/400842/#comment17584054 where this exact thing has happened
We could remove FlashFS and change the partitions so we have a great big area for Storage - and because of the way Storage stores data it's all memory-mapped, so if you write something to it (for example an image) it can be used in Espruino straight from Flash without ever loading it into RAM.