Flash Pages (Code, FS, Bootloader, Softdevice)

Posted on
  • 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 decrease flash_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?

  • 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's fstorage code, so it can save bonding data and known peers
    : https://github.com/espruino/Espruino/blo­b/master/make/common/NRF5X.make#L203

    It 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?

  • 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.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Flash Pages (Code, FS, Bootloader, Softdevice)

Posted by Avatar for AntiCat @AntiCat

Actions