-
-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E.setBootUpCode
#740
Comments
So currently the code here does:
Ideally, there would be a second uint32 in the saved code that contains the length of a string in flash with code (as text) that would be executed at startup. If that uint32 existed, at bootup (right before Actually I'll take a quick look at this now... |
Got it. I will think how we can do this. Is it an existing issue on GitHub (#740?) or should we create new to discuss problems related to the feature? |
It's an existing issue, so best to discuss here. Initially this exists because certain things (like the Espruino PC) would really benefit from having some code that always runs regardless of the state of the interpreter. But it'll solve your issues on espruino/EspruinoTools#28 too :) |
Ok, try the You can do:
After doing that, Espruino won't actually reset. You'll have to do it with When you do reset, Espruino will execute all that JS code as if it has just been uploaded. After that, to reset Espruino to a fresh state you'd need: Not ideal, but it's a good start. I need to think a bit about the interaction with |
Branch deleted, merged into master. |
Whoa! Works perfectly. Thank you for the feature and for merging it into master. |
Discussion here:
http://forum.espruino.com/conversations/275207/
Strangely it didn't seem to make it into a GitHub issue. Would be very easy with the addition of: #738
The text was updated successfully, but these errors were encountered: