Help to resolve free space problem

Posted on
  • Hi to everyone! I have trouble whith esp8266 12F FW1.91 espruino.
    I send code to espruino. Code working well without errors. But if i do save(), i got error:
    Too big to save to flash (13624 vs 12284 bytes)
    Delete command history and try again...

    (While: process.memory() = {"free": 908, "usage": 792, "total": 1700, "history": 441})
    Enabled minification in ide setup is not helpful.

    I use simple mqtt client sample from original documentation espruino.com/MQTT

    What i do invalid? Why is not free space? How to resolve this problem?
    Help please!

    My code:

    var server = "m13.cloudmqtt.com";
    var options = {
        client_id : "test_machine",
        keep_alive: 60,
        port: 12345,
        clean_session: true,
        username: "user",
        password: "pass",
        protocol_name: "MQTT",
        protocol_level: 4,
      };
    var mqtt = require("MQTT").create(server, options /*optional*/);
    
    mqtt.connect();
    
    mqtt.on('connected', function() {
      mqtt.subscribe("test");
    });
    
    mqtt.on('publish', function (pub) {
      console.log("topic: "+pub.topic);
      console.log("message: "+pub.message);
    });
    
    var topic = "test";
    var message = 1;
    setInterval('mqtt.publish(topic, message++);', 2000);
    
  • Replied to message on Gitter

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

Help to resolve free space problem

Posted by Avatar for Planer @Planer

Actions