-
• #2
Can I simply increase pages and decrease flash_available
Yes, you can! Obviously the start address needs to change too, but it should be pretty straightforward.
Annoyingly
FS
is for Nordic'sfstorage
code, so it can save bonding data and known peers
: https://github.com/espruino/Espruino/blob/master/make/common/NRF5X.make#L203It probably uses 100 bytes of data in most cases, but it requires 2x 4kB flash pages to function :(
It may be possible to just not include fstorage in the build and then make your own stub functions for read/write that use Espruino's Storage implementation though?
-
• #3
Thank you for the explanation.
I've looked at the interface
libraries/fstorage/fstorage.h
and at least the arguments are at a very low abstraction level. Even if we would reimplement it, I'm not sure if we could save storage.
I've started to port old code that uses the (deprecated) Flash-Module to the Storage-Module.
With the Flash-Module I could disable features like NET, GRAPHICS and thereby increase the Storage available to me. (As far as I know, the Flash-Module uses the pages between the executable and the reserved area).
The Storage-Module, on the other hand, seems to use the pages defined by
pages: 10
.Can I simply increase
pages
and decreaseflash_available
by the same amount to move the free space from the Flash-Module to Storage-Module?What are the 2 pages reserved for
FS
for?