10k limit on esp8266

Posted on
  • hi, i use espruino_1v95, and if u upload file > 10kb - i have error:

    >Uncaught SyntaxError: Got UNFINISHED STRING expected EOF
     at line 1 col 15
    New interpreter error: LOW_MEMORY,MEMORY

    if i send file <10kb - it's ok, maybe I'm doing something wrong?

    process.memory() print:

    ={ "free": 1660, "usage": 40, "total": 1700, "history": 773,
      "gc": 3, "gctime": 1.542 }

    and process.memory(), with file almost 10 kb in size

    ={ "free": 1155, "usage": 545, "total": 1700, "history": 0,
      "gc": 23, "gctime": 1.66 }
  • Espruino write on start:

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v95 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
  • Yes, that's what you'd expect.

    Turn off Save on send and you may well be able to manage more.

    edit: it's something that'll hopefully change soon, but right now you need to load your code into RAM in one go before writing it to flash.

  • thanks Gordon, the file success send, but if i want save it - i have error:

    Erasing Flash.....
    ERROR: Too big to save to flash (26151 vs 12284 bytes)
    Deleting command history and trying again...
    Erasing Flash.....
    ERROR: Tooàþ
     ets Jan  8 2013,rst cause:4, boot mode:(3,7)
    wdt reset
    load 0x40100000, len 2408, room 16
    tail 8
    chksum 0xe5
    load 0x3ffe8000, len 776, room 0
    tail 8
    chksum 0x84
    load 0x3ffe8310, len 632, room 0
    tail 8
    chksum 0xd8
    csum 0xd8
    2nd boot version : 1.6
      SPI Speed      : 80MHz
      SPI Mode       : QIO
      SPI Flash Size & Map: 32Mbit(512KB+512KB)
    jump to run user1 @ 1000

    esp12 have 4mb flash memory, why it's say what i have 12284 bytes?

  • thanks, I have one more question, did not notice the "Reply" button

  • The esp8266 has limited ram, and only 12k is left after the interpreter and operating system.

    If you minimize the code before uploading, you may be able to get it to fit.

    What is the code you are trying to load? It seems quite large.

  • Code here, it's management of climate monitoring via telegram api, at this moment - work wine, but i want keep subscribers and notify them when necessary.

    At this moment free space in esp for additional methods is end, and i dont have idea how to fix it.

    Here MaBe proposes to use "eval" and keep code inside unused flash memory:

      { "addr": 487424, "length": 4096 },
      { "addr": 524288, "length": 4096 },
      { "addr": 1011712, "length": 36864 },
      { "addr": 1048576, "length": 3129344 }

    is it real for me?

  • Flash map 4MB:512/512, manuf 0xe0 chip 0x4016

    You have a ESP8266 with a 4MB flash, but flashed firmware for a ESP 01 512K.

    Check ESP8266 page, section Build Content

  • ok, i apologize for the stupid questions and thank you for the explanation.

    Спасибо, товарищи!

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

10k limit on esp8266

Posted by Avatar for kameas @kameas