save() not work on ESP32

Posted on
  • A simple code like this:

    function setup_sim800c() {
    console.log("Hello, SIM800C!");
    }

    E.on('init', function(){setup_sim800c();});

    then click send to Espruino button, after done, enter "save()" in left IDE window:

    save()
    =undefined
    Erasing Flash..................
    Writing.....
    Compressed 80000 bytes to 3036
    Checking...
    Done!
    Hello, SIM800C!

    things seams OK, but reset the board, nothing printed. setup_sim800c symbol is not found either.
    ...
    Loading 3036 bytes from flash..

  • ...try with the 'old' onInit() { setup_sim800c(); };. If this does not help, defer the invocation of setup_sim800c() with a setTimeout(). Since nothing is printed, I'm not sure where the print goes... can you flash some LED on a pin?

  • not work, after save(), log is printed. but reset the board, cannot see the hello string except boot messages.

    function setup_sim800c() {
    console.log("Hello, SIM800C!");
    }

    function onInit() {setup_sim800c();}

    save()
    =undefined
    Erasing Flash..................
    Writing.....
    Compressed 80000 bytes to 3010
    Checking...
    Done!
    Running onInit()...
    Hello, SIM800C!
    ets Jun 8 2016 00:22:57
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    ets Jun 8 2016 00:22:57
    rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_d­rv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0008,len:8
    load:0x3fff0010,len:1932
    ho 0 tail 12 room 4
    load:0x40078000,len:10012
    load:0x40080000,len:252
    entry 0x40080034
    ERROR: jswrap_wifi_restore: esp_wifi_connect: 10
    Loading 3010 bytes from flash...

  • Have you got saved code from previous firmware?

    If you erase the flash and then reflash the firmware, and upload the code, I think it will be ok.....

  • Which firmware version are you running?

  • I am having same problem with the save(). I have my own onInit() called in the save.

  • Mine was not working also... and a full reflash makes it save again.

    I believe that the flash gets corrupted when the core crashes... and it does a lot.

  • I find mine crashes a lot too. Does anyone have any insight why it's so unstable? Is it issues with the Espruino port or something else. Does it depend on the specific board -- are some more stable than others.

  • Does it depend on the specific board -- are some more stable than others.

    I think the powersupply has a lot to do with it.

  • Yeah this has happened to me too a few times. If I see anything that reproduces it reliably I'll post something.

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

save() not work on ESP32

Posted by Avatar for user81716 @user81716

Actions