-
• #2
I'd be interested in seeing your code if you are happy to share..
-
• #3
Once its done I'll put it up :)
-
• #4
Sounds like a great plan. Perhaps you could use the watchdog timer and have some kind of reboot counter so that the bootloader could recover itself if the device ever got a broken update?
-
• #5
Any progress?
-
• #6
+1 for a progress update :P
-
• #7
Here you go. It needs much more work on checking for errors. Unfortunately I don't think SD errors are catchable so they can't be handled right now.
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.