You are reading a single comment by @jgw and its replies. Click here to read the full conversation.
  • Hi,
    The Bangle.js 2 feature page notes :

    256kB RAM 1024kB on-chip flash, 8MB external flash

    I'm confused about Espruino's various getFree() outputs :

    >process.version
    ="2v10.89"
    >process.memory()
    ={ free: 7172, usage: 4828, total: 12000, history: 34,
      gc: 0, gctime: 20.99609375, blocksize: 15, stackEndAddress: 537085312, flash_start: 0,
      flash_binary_end: 523848, flash_code_start: 1610612736, flash_length: 1048576 }
    

    'flash_length' would then be the size of the internal flash ?

    And then there is :

    >require("Flash").getFree()
    =[
      { addr: 524288, length: 483328 }
     ]
    >require("Storage").getFree()
    =8277864
    > 
    

    After reading

    Flash Library
    This module allows you to read and write the nonvolatile flash memory of your device.
    Also see the Storage library, which provides a safer file-like interface to nonvolatile storage.

    I thought the 'Flash' and 'Storage' modules accessed the same Flash memory, with a separate API (roughly page vs file). But how then is the getFree() output to be interpreted ? Do I actually have 8 MByte available for access through the 'Storage' module ?

    What then is the length of 483328 for the 'Flash' module ?

    (I have about 60 kByte of code and files on the Bangle.js 2 for the moment, so I don't think it has anything to do with the Flash not being consecutive anymore.)

    (All these questions because I need 'a lot' of space for storing a Far-East unicode font...)

About

Avatar for jgw @jgw started