• Uncaught Error: Function "setBootCode" not found!

    Some simple code on the right side to test require()

    console.log("aaa");
    //require("ESP8266WiFi_0v25");
    console.log("bbb");
    

    Produces the following on the left side when send to Espruino is clicked

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v80 Copyright 2015 G.Williams
    >echo(0);
    Uncaught Error: Function "setBootCode" not found!
     at line 1 col 3
    E.setBootCode("console.log(\"aaa\");\n//­require(\"ESP8266WiF...
       ^
    =undefined
    > 
    

    In the Web IDE Setting:Communications
    See if Save on Send is checked, uncheck it
    On the left side enter reset(); followed by save();

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v80 Copyright 2015 G.Williams
    >save();
    =undefined
    Erasing Flash.....
    Writing...
    Compressed 81600 bytes to 878
    Checking...
    Done!
    > 
    

    Now try the send to Espruino button.

    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v80 Copyright 2015 G.Williams
    >save();
    =undefined
    Erasing Flash.....
    Writing...
    Compressed 81600 bytes to 878
    Checking...
    Done!
    >reset();
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v80 Copyright 2015 G.Williams
    >echo(0);
    aaa
    bbb
    =undefined
    > 
    

    This was tried on an Espruino board and a Pico

  • 1v80 Copyright 2015 G.Williams

    1v80, that's ancient!

  • Yes, to get setBootCode you'd need to update the firmware to a 'cutting edge' build - I don't think it's in the current 1v85 release.

    Did you get that error with a fresh board? The functionality got added to the Web IDE a few days ago, but it shouldn't have been enabled by default - as you discovered, Save on Send is what causes it (but that should be off unless you click it).

    I'll be doing new release of Espruino soon that'll have setBootCode in it, so hopefully with up to date firmware, this will go away.

  • The 1v80 was the Pico, my Espruino board is 1v85 and had the same problem.
    I bought both of them about a month ago.

  • Yes, 1v85 won'[t have it - by 'cutting edge', I mean these ones - basically the code we're working on, before making a 'release'.

    So when 1v86 is released (soon hopefully) it'll have it in, or you can use the builds above... But for now I'd be tempted to just leave the option off.

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

Uncaught Error: Function "setBootCode" not found! A solution

Posted by Avatar for ClearMemory041063 @ClearMemory041063

Actions