• Aren't there currently separate Makefile targets and binaries for all the different amounts of flash? If those are absolutely required then I guess it's not a big deal if that's hard-coded?

    Espruino will always have a fixed amount of RAM to play with on all ESP8266's? in which case it'll only need the same area of flash memory in each. Hopefully the rest of the memory would still be exposed to the user though (but that's fine, because it can be done via the jshardware flash read/write functions).

    So right now, Espruino only executes from RAM - and when it saves, it doesn't save the raw JS code - it saves what's in RAM. So the state of the interpreter at that time - functions, variables, active timers, pin state, etc.

    It's done that way so you can develop using just the 'console' if you need to - or can upload code, but then can just tweak things very slightly and save again.

    Potentially it could execute from raw JS code in flash, but I don't think that helps a great deal. Whenever a function gets defined it'd go into RAM anyway, so you'd still end up losing quite a bit of memory.

    Now Espruino could store read-only variables in flash, and have writable ones in RAM - but that's actually a pretty massive change.

About

Avatar for Gordon @Gordon started