You are reading a single comment by @tve and its replies. Click here to read the full conversation.
  • To load modules automatically at boot or reset, use the following:

    // Copyright (c) 2015 Thorsten von Eicken. MIT License
      "(function(){" +
        "var FL=require('Flash');var FR=FL.getFree()[2];var FB=FR.addr;var FS=4096;" +
        "var FN=FR.length/FS;var FO=1075838976;" +
        "for(var c=0;c<FN;c++){" +
          "var b=FB+c*FS;var,b);var d=a[0]<<2;var e=b+4+d;var f=a[1]<<4;" +
          "if(a[0]==0||a[1]==0||a[2]!=165||a[3]!=1­95){" +
            "console.log('  nothing at',b.toString(16));continue;}" +
          "var g=E.toString(,b+4)).trim();" +
          "console.log('  memoryArea',e.toString(16),f,g)," +
          "Modules.addCached(g,E.memoryArea(FO+e,f­));" +

    it uses no JSvars itself once executed. Caveat: currently boot code doesn't work on the esp8266 due to­ues/891


Avatar for tve @tve started