Flash and Storage question

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

    could anybody explain:

    1. what is "on-chip flash" for? Is it for firmware only?
    2. there are modules Flash, Storage, StorageFile, fs.
      all can read/write... to which flash?
    3. does block address space include both on-chip flash and external flash, kind of concatenates 1MB and 8MB, or they are separate?
    4. I need to write text or binary files, they may be long size. Should I use StorageFile.write()?
    5. what type of filesystem is it? FAT, VFAT?
    6. I could not find how to get metadata of a file - size, create time, change time. I hope at least size should be somewhere.
    7. can I create folders?
  • what is "on-chip flash" for? Is it for firmware only?

    Right now, yes - at some point I'll enable the option to write files to internal flash though (which is faster)

    there are modules Flash, Storage, StorageFile, fs. all can read/write... to which flash?

    It depends. Storage -> external (at the moment), Flash -> anywhere, fs -> not enabled on Bangle.js

    does block address space include both on-chip flash and external flash, kind of concatenates 1MB and 8MB, or they are separate?

    They're separate

    I need to write text or binary files, they may be long size. Should I use StorageFile.write()?
    what type of filesystem is it? FAT, VFAT?

    It's a custom filesystem designed to allow files to be written in one contiguous chunk (if needed). For text files that are being appended to, use StorageFile.write() - but for binary or if you know the file size up front you just want to write direct with Storage.

    I could not find how to get metadata of a file - size, create time, change time. I hope at least size should be somewhere.

    There is no metadata apart from size. storage.read("file").length is fine for size

    can I create folders?

    Nope

  • Thank you Gordon!

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

Flash and Storage question

Posted by Avatar for Mark_M @Mark_M

Actions