You are reading a single comment by @fanoush and its replies. Click here to read the full conversation.
  • I think the protection is only enabled for official board names
    https://github.com/espruino/Espruino/blob/master/targets/nrf5x/jshardware.c#L2135

    If it is reproducible then maybe logging in jshFlashErasePage for zero address could be interesting to see if it gets triggered. Or the procection there could be enabled to see if it goes away.

    Anyway uploading similar code for two different devices to third device without reset() in-between is definitely asking for trouble and is great stress test. Anything could happen during upload

    • watchdog trigger
    • out of memory
    • stack overflow
    • mix of old and new code running from watches and intervals

    However erasing MBR is still interesting result of such abuse, the js code uploaded does not write/erase internal flash anywhere. If the code was really uploaded to ram only and not storage then even storage bug in not likely.

  • However erasing MBR is still interesting result of such abuse

    Honestly it was an accident and I bricked a brand new watch unfortunately. I reproduced it later on another opened watch.

About

Avatar for fanoush @fanoush started