You are reading a single comment by @saj42 and its replies. Click here to read the full conversation.
  • Hi, If I send code to the device's RAM (2v07.14) then enter save(); I get an error message stating that my code is too big to save to flash.
    The error message doesn't appear when using 2v06.

    The code is simple and is....

    var on = true;
    function setP()
    {
      if (on)
      {
        digitalWrite(D4,1);
        on = false;
       show("1   1\n"+
         "  1  \n"+
         "  1  \n"+
         "1   1\n"+
         " 111 \n");  }
      else
      {
         digitalWrite(D4,0);
         on = true;
        show(0);
      }
    }
    
    setWatch(function() {
      setP();
    }, BTN1, {repeat:true, debounce:20, edge:"falling"});
    

    Details of 2v07.14

     2v07.14 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    >save();
    =undefined
    Compacting Flash...
    Calculating Size...
    ERROR: Too big to save to flash (2358 vs 2048 bytes)
    Deleting command history and trying again...
    Code is too big to save to Flash.
    

    I've worked out that the code isn't minified on the device.

    Is the ~2k flash for both firmware and code?

    Thanks
    Steve

About

Avatar for saj42 @saj42 started