You are reading a single comment by @maze1980 and its replies. Click here to read the full conversation.
  • I've compiled a firmware with STORAGE enabled, but putting more and more pages on the ESP8266 it seems like there's not even 1 MB of free storage available while flash is almost 2 MB:

    /*
    >require("Storage").getFree();
    =196608
    >require("ESP8266").getFreeFlash()
    =[
      { addr: 2097152, length: 1048576 },
      { addr: 3145728, length: 262144 },
      { addr: 3407872, length: 262144 },
      { addr: 3670016, length: 262144 },
      { addr: 3932160, length: 241664 }
     ]
    */
    >
    

    Somehow I expected the STORAGE module to use all available flash storage, not just the block where the program and wifi data is stored. Is it the intended behavior, or a bug in my build?

  • Just a hunch: ESP8266's flash is divided to multiple parts: Running code, SPIFS, OTA partition, etc. My guess is that's why you only see that much free flash.
    There are compiler flags to set flash partition on the ESP8266, and I think separate compiler options to reserve space for Espruino's storage.

About

Avatar for maze1980 @maze1980 started