New-Bee Observations

Posted on
  • Throughout my code development, I have noticed some strange quirks when uploading new code to the Espruino.

    Observation 1
    If there was a "large" amount of code revisions, from the previous upload, after hitting the reset() and upload in the IDE, the computer does not display the progress bar until it thinks what it should be doing. In some cases, 5 to 10 seconds can elapse until the progress bar is displayed for the user.
    For a novice, like me, this delay without the progress bar showing, I would constantly send a reset to the Espruino. The progress bar should be shown immediately after the reset.

    Observation 2
    Patching and making "large" new user code (using BigRam v70) the Espruino hangs at boot time. The trick I used was to "piecemeal" and upload "small" sections of code with no "boot hangs" until all the code was done.

    Note: This is the same problem I had previous going from v69 to v70 BigRam. What I did was to re-write an algorithm and the problem seemed to disappear?

    Below could be the culprit - could be wrong? ...

    Just to add that if you flash these, Espruino will start remembering
    the code that you saved between firmware updates. If I've changed the
    way data is stored internally then it can cause Espruino to hang at
    boot time.

    To fix it, just press reset, and hold down BTN1 for a few seconds
    immediately after releasing reset (but not before or you'll enter
    bootloader mode with the pulsing blue LED).

    Windows 8.1 64 Bit
    Chrome 35.0.1916.153 m (no beta)
    Espruino 1v70 BigRam 3250 JSVARS
    Web-IDE v 46
    Board: Espruino v 1.3

    BTW ... Fixed your spellguard so it doesn't flag Espruino as mis-spelled.

  • When you say it hangs at boot - do you mean it's hanging when it's reset to send the code? or when you've saved the code and then reset the Espruino?

    I've never been able to get the magic touch you quoted to work when I've gotten an Espruino wedged because I flashed a new bigram build after save()'ing with an old build with different data storage format.

    That's why I made the flashclear script. When you flash firmware, the first 256k get erased - but the other 256k do not. Flashclear just erases those.

  • When you say it hangs at boot - do you mean it's hanging when it's
    reset to send the code? or when you've saved the code and then reset
    the Espruino?

    OK, put it another way, when I upload to the Espruino, I first issue a reset() then "upload" my code to the Espruino. The progress bar shows after erasing the chip. Then, after the end of the progress bar completion (100%), sometimes, on the Espruino LEDs, it shows them cycling and other times it does not after which it "hangs" with no communications feedback to the Espruino.
    addition ...
    I always upload the code and when everything is ok, only then do I issue a save().

  • LEDs cycling? I guess that means some code is running when you upload.

    What happens if you remove the call onInit() from the end of the code that you upload? does it always work in that case?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

New-Bee Observations

Posted by Avatar for user7114 @user7114

Actions