You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • That's great! Thanks for posting up the code - I'd forgotten about the issues you can hit if you're evaluating a function from Flash memory when you delete the flash! You could actually call E.reboot() to properly force a reboot without waiting for it to crash :)

    Just to add if you're using almost too much memory there is a very small chance that E.toString(ST.read(".bootcde")) will work, but will then fail later on once a bit more memory is used during eval - but it's super unlikely :)

    I could definitely add the ability to use JsVars for storage when compacting, which would make it a little less likely that you have to do this. Potentially Espruino could also scan over all the functions inside itself and adjust the addresses such that compact wouldn't cause them to break when using save to flash.

About

Avatar for Gordon @Gordon started