• There is Flash api (blocks) and there is Storage api (files).

    With Bangle came the feature that the SPI flash can be used together with internal flash i.e. same Flash api works with both. SPI flash is mapped to address 0x60000000 see this.
    This is pretty generic feature you can enable too and I do this for my Espruino builds for P8 and other devices with SPI/flash - F07, DK08, B5.

    Then there is Storage which is layered on top of Flash and you select which address and how many blocks are used for files. So you can use internal flash or SPI flash based on the address you pick, for bangle this is here

    So with bangle both is in SPI flash. In my builds I keep Storage in internal flash but SPI is still accessible via Flash API over address 0x60000000 and up.

    Reason for such Storage setup is that internal flash is faster and you can use data and run javascript in place - big strings points directly to flash and no RAM is needed for that.

    The best would be to have two Storage 'drives' one for javascript code and some smaller data files and another bigger one in SPI flash. There is issue for that idea here https://github.com/espruino/Espruino/iss­ues/1899

    Anyway, if you want just block access - circular buffer then indeed you don't need W25 module and the functionality can be builtin via the Flash API https://www.espruino.com/Reference#Flash­ if you map the SPI flash in board file.

About

Avatar for fanoush @fanoush started