Think that I developed an application, wrote it to the device, tested it, and send to the field when it's ready.
It turns out, my application had a bug.
I have a very very good idea(!) that the problem is just the var x = 1;, it should be var x = {1} (watch the typo)
I send the code to the device, and the device is bricked now and I have no option to fix the last wrong app...
My plan as a precaution is the following:
I can send this untested code with a mark to indicate "to be tested",
device would download and save it,
make it loaded on next reboot, and
watch for a specific "heartbeat" sign (for example, I can set a timeout for a specific FlashEEPROM location value and set the "OK" value over socket connection, which will guarantee that my second application boots and connects correctly).
If no heartbeat is found within a timeout, then old code will be loaded and new code will be discarded by the device (bootloader) itself.
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'm making a plan for such a scenario:
var x = 1;
, it should bevar x = {1}
(watch the typo)My plan as a precaution is the following:
bootloader
) itself.