You are reading a single comment by @saj42 and its replies. Click here to read the full conversation.
  • Hi @Gordon, I'm not sure now whether this is the right place to post but I'll give it a go.

    That's started to work well now.
    If I write a simple bit of code and set the WebIDE to flash I get a an uncaught error.
    If I send to the device's RAM then enter save(); I get a fuller error message stating that my code is too big to save to flash.

    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"});
    

    My code is ~300 bytes.
    If my understanding of http://forum.espruino.com/conversations/­346537/#comment15336682 is correct then I should have 262144-260096 ie 2048?

    >process.memory();
    ={ free: 267, usage: 33, total: 300, history: 8,
      gc: 0, gctime: 3.02124023437, blocksize: 12 , stackEndAddress: 536884560, flash_start: 0,
      flash_binary_end: 258940, flash_code_start: 260096, flash_length: 262144 }
    

    Thanks
    Steve


    2 Attachments

    • Flash.png
    • RAM then Save.png
About

Avatar for saj42 @saj42 started