I do not exactly understand what you what to achieve. After a successful upload followed by a save(), all your code is in the FlashEEPROM. Any reset / restart / power cycle will restore (some of) the machine state and, load all code into the memory, and start with onInit() or with all functions registered with E.on("init",f...);.
In case you plan something different, like a remote update of the saved code in form of a second version and you want to load it into the FlashEEPROM and switch over with a reset... that may be something else.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I do not exactly understand what you what to achieve. After a successful upload followed by a
save()
, all your code is in the FlashEEPROM. Any reset / restart / power cycle will restore (some of) the machine state and, load all code into the memory, and start withonInit()
or with all functions registered withE.on("init",f...);
.In case you plan something different, like a remote update of the saved code in form of a second version and you want to load it into the FlashEEPROM and switch over with a reset... that may be something else.