You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • That info would have to be persisted in the save() area

    I'm not sure I understand this? You mean that when you update firmware you don't want to overwrite it?

    Really good documentation on the memory layout though - I need one of those for Espruino boards :)

    I think if we added int jshGetFreeFlashAreas(uint32_t **addressAndLength, int maxAreas) to jshardware.c then the process.memory implementation could just use that, and report each area back as addr and length?

    I guess probably returning a set of ranges (from + length) would be best, as otherwise you're going to get swamped with data items if you ask how many pages are in the 4MB parts :)

    ... other option is to just have JsVar *jshGetFreeFlashAreas() and let each platform return its own array of data (I guess then some platform-specific hints could be added).


Avatar for Gordon @Gordon started