In what is probably a very bad idea, I've decided to have a crack at writing some code for the Espruino which will update itself. i.e, you flash a bootstrapper to the Espruino, and after it runs its first init, it will fetch more javascript code from the internet (even the bootstrapper code), write it to the node_modules folder on the connected SD card, and reboot into the new code.
Basic tests have gone well, but no doubt I will run into some critical issue at some point.
As for why, I need to be able to deploy my Espruino WiFis to a location and not require them to come back to me to be updated, so self updating is a must.
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.
In what is probably a very bad idea, I've decided to have a crack at writing some code for the Espruino which will update itself. i.e, you flash a bootstrapper to the Espruino, and after it runs its first init, it will fetch more javascript code from the internet (even the bootstrapper code), write it to the
node_modules
folder on the connected SD card, and reboot into the new code.Basic tests have gone well, but no doubt I will run into some critical issue at some point.
As for why, I need to be able to deploy my Espruino WiFis to a location and not require them to come back to me to be updated, so self updating is a must.