My code cannot be saved to ESP8266

Posted on
  • After enter "save()" .
    It show "Erasing Flash.....
    Writing............
    Compressed 27200 bytes to 10081
    Checking...
    Do>"
    There is no reaction to this step


    1 Attachment

    • QQ图片20171129114530.png
  • if use E.setBootCode('...'); then show module 'ws' not found.
    Who know how to save?


    1 Attachment

    • QQ图片20171129163109.png
  • What do you mean no reaction ? Does your board freeze and become unresponsive to any command?
    did you try reset() and load() after your save() ?
    The save() work perfectly on my 8266 4mb board. It's only the save-on-send that doesnt.
    Do you realize that in your code you do not call send() ?
    For external modules, like ws, the code need to be uploaded too, for setBootCode to work. Have a look on the log of WebIDE to see how he send the module code too when you use upload button.
    Try flashing a previous version of espruino, like 1.91, 1.92 or 1.93, maybe it will help

  • Thank you very much.
    I'll study it.

  • save() does what it says: saving the code (status of the RAM) intoFllash. When you power-cycle, Espruino restores the code (loads the saved state) and invokes onInit() {...} or E.on("init",function(){...}) registered functions. Personally, I prefer the onInit(){...} because no matter of the code load sequence, I get the sequence I want.

    If you do not want to power-cycle, invoke/enter onInit(); from with/in the console, and you get your code started. Read through this conversation about simple explanation how to save code that espruino run on start?.

  • Thank you very much,you let me learn a lot. ^_^

  • ...@Jessie, thanks for the feedback, makes my <3 and face :)

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

My code cannot be saved to ESP8266

Posted by Avatar for Jessie @Jessie

Actions