• I made a simple setup with a 16x4 LCD screen (HD44780) outputting the data from a serial GPS module. I used software serial on v2.00 because hardware serial on NodeMCU confused me.

    function onInit() {
      I2C1.setup({scl:D14, sda:D12});
      var lcd = require("HD44780").connectI2C(I2C1, 0x3F);
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print('Ready...');
    
      var s = new Serial();
      s.setup(9600,{rx:D5, tx:D4});
    
      var gps = require("GPS").connect(s, function(data) {
        lcd.setCursor(0, 0);
        lcd.print('Time: '+data.time);
    
        lcd.setCursor(0, 1);
        lcd.print('Loc:  '+data.lat+', '+data.lon);
    
        lcd.setCursor(0, 2);
        lcd.print('Sat:  '+data.satellites);
    
        lcd.setCursor(0, 3);
        lcd.print('Alt:  '+data.altitude);
      });
    }
    
    save();
    

    Pushing up the code works, but if I need to change it, pushing up the code the next time results in a New interpreter error: FIFO_FULL, followed by the NodeMCU spewing the following into the console forever:

    Œâì‚nì’r‚òn|ìllll`b’ž|r’lœnà‚nâl`Œâr’lŒlþLoading 4343 bytes from flash...
     ets Jan  8 2013,rst cause:2, boot mode:(3,7)
    load 0x40100000, len 2408, room 16
    tail 8
    chksum 0xe5
    load 0x3ffe8000, len 776, room 0
    tail 8
    chksum 0x84
    load 0x3ffe8310, len 632, room 0
    tail 8
    chksum 0xd8
    csum 0xd8
    2nd boot version : 1.6
      SPI Speed      : 80MHz
      SPI Mode       : QIO
      SPI Flash Size & Map: 32Mbit(512KB+512KB)
    jump to run user1 @ 1000
    Œâì‚nì’r‚òn|ìllll`b’ž|r’lœnà‚nâl`Œâr’lŒlþLoading 4343 bytes from flash...
     ets Jan  8 2013,rst cause:2, boot mode:(3,7)
    load 0x40100000, len 2408, room 16
    tail 8
    chksum 0xe5
    load 0x3ffe8000, len 776, room 0
    tail 8
    chksum 0x84
    load 0x3ffe8310, len 632, room 0
    tail 8
    chksum 0xd8
    csum 0xd8
    2nd boot version : 1.6
      SPI Speed      : 80MHz
      SPI Mode       : QIO
      SPI Flash Size & Map: 32Mbit(512KB+512KB)
    jump to run user1 @ 1000
    // ...(forever)
    

    ...and the onboard LED to flicker continuously. The is NOT fixed by reflashing with v2.00! Here's how I am currently working around it:

    1. Downgrade firmware to v1.99 (prevents saved code from running)
    2. Upload some safe code that doesn't use software serial
    3. Upgrade firmware back to v2.00
    4. Upload my updated code

    If anyone has a tip on preventing this error from happening I would really appreciate it!

    Also, when the ESP8266 gets into this sort of continual error state, is there an easier way to clear saved code aside from changing the firmware version and pushing up some new code?

  • This is the setup dumped onto an outdoor table so the GPS module could see the sky :D

  • Hi @Programbo,

    Some hints:

    • replace save(); at the end of upload code with setTimeout("save();",1000);

    • switching between release have to include erase flash, check README_flash.txt.

    • soft serial is not part of 2v00 release, you have to get a cutting edge build.

    • use 4MB build for 4MB boards, check build content

  • Thanks @MaBe! Functionally, what does delaying the save do?

    Regarding software serial, it seems to work! I got the info from here: https://www.espruino.com/USART#software-serial

    As of Espruino v2.00 you can set up 'software serial'...

    That said, I am using Flasher.js to flash my boards, so maybe that is getting the cutting edge build! I'll check...

  • @MaBe Firmware version seems to be ESP8266 stable rather than cutting edge. This is the Flasher.js manifest for the firmware I am using:

    https://github.com/thingsSDK/flasher.thingssdk.com/blob/master/public/v1/esp8266/esp12/espruino/manifest.2.00.json

    When I have this trouble again (probably tomorrow ;) I will try running esptool.py --port /dev/tty.whatever --baud 115200 erase_flash to see if I can avoid doing the firmware version dance.

  • Functionally, what does delaying the save do?

    give the interpreter more time to finish loading the code before it is saved ;-)

  • Cheers, @MaBe! Any idea what the stuff being dumped into the console is all about?

  • Any idea what the stuff being dumped into the console is all about?

    it is not possible to load code save with older or new Espruino version with other versions, that's why erase flash is needed.

  • That was happening when trying to upload modified code to the same firmware! Espruino already explicitly prevents running code uploaded on a different firmware version. I used that feature to save me because switching firmware would stop my software serial code from automatically running so I could upload safe code before bringing it back to v2.00 :D

  • Ok, so i would guess that save started before code was fully interpreted and this causes the issues during loading.

  • Can't wait to try this fix. I'm pushing to spend more time at work on Espruino work for prototyping so expect to see me around whenever I can't solve a problem with Google.

    Thanks for the tips, @MaBe!

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

Software serial causing FIFO_FULL requiring flashing to fix

Posted by Avatar for Programbo @Programbo

Actions