• Aren't there currently separate Makefile targets and binaries for all the different amounts of flash?

    Yes. See https://github.com/tve/Espruino/blob/master/Makefile#L463-L535
    But FLASH_SAVED_CODE_START is set through the board config stuff, isn't it?

    it'll only need the same area of flash memory in each

    Correct, but at different start addresses. With a 512KB flash we'll have to squeeze the save area in there. With 4MB it can move up beyond the firmware partition, which will help with ensuring that upgrades don't wipe it out.

    Whenever a function gets defined it'd go into RAM anyway

    Do you have an high-level overview of how this works? You store the source in RAM? Is that in JsVars or somewhere else? Do you parse it into an AST or something and then interpret that? And what does the compiler produce?

About

Avatar for tve @tve started