NON OS SDK v3.0.x Notes - mhightower83/Arduino-ESP8266-misc GitHub Wiki

DRAFT - WIP

With Arduino ESP8266, use the Arduino IDE Tools menu to make a config selection for an IRAM Heap. Choose 16KB cache + 48KB IRAM and 2nd Heap (shared). To make your Sketches easy to build with older SDKs stick to the menu options documented for the Arduino ESP8266. Do not use the "add function user_iram_memory_is_enabled" method found in the Espressif documentation.

extern "C"
bool user_iram_memory_is_enabled(void) 
{ 
  return true;
}

Partitions

From NON OS SDK 3.0.5 user_interface.h

enum flash_size_map {
    FLASH_SIZE_4M_MAP_256_256 = 0,  /**<  Flash size : 4Mbits. Map : 256KBytes + 256KBytes */
    FLASH_SIZE_2M,                  /**<  Flash size : 2Mbits. Map : 256KBytes */
    FLASH_SIZE_8M_MAP_512_512,      /**<  Flash size : 8Mbits. Map : 512KBytes + 512KBytes */
    FLASH_SIZE_16M_MAP_512_512,     /**<  Flash size : 16Mbits. Map : 512KBytes + 512KBytes */
    FLASH_SIZE_32M_MAP_512_512,     /**<  Flash size : 32Mbits. Map : 512KBytes + 512KBytes */
    FLASH_SIZE_16M_MAP_1024_1024,   /**<  Flash size : 16Mbits. Map : 1024KBytes + 1024KBytes */
    FLASH_SIZE_32M_MAP_1024_1024,    /**<  Flash size : 32Mbits. Map : 1024KBytes + 1024KBytes */
    FLASH_SIZE_32M_MAP_2048_2048,    /**<  attention: don't support now ,just compatible for nodemcu;
                                           Flash size : 32Mbits. Map : 2048KBytes + 2048KBytes */
    FLASH_SIZE_64M_MAP_1024_1024,     /**<  Flash size : 64Mbits. Map : 1024KBytes + 1024KBytes */
    FLASH_SIZE_128M_MAP_1024_1024     /**<  Flash size : 128Mbits. Map : 1024KBytes + 1024KBytes */
};

more discussion here

Size Nible Size In Bytes Description
0 512K FLASH_SIZE_4M_MAP_256_256
1 256K FLASH_SIZE_2M,
2 1M FLASH_SIZE_8M_MAP_512_512,
3 2M FLASH_SIZE_16M_MAP_512_512,
4 4M FLASH_SIZE_32M_MAP_512_512,
5 2M-c1 FLASH_SIZE_16M_MAP_1024_1024,
6 4M-c1 FLASH_SIZE_32M_MAP_1024_1024,
7 512K** FLASH_SIZE_32M_MAP_2048_2048
8 8M FLASH_SIZE_64M_MAP_1024_1024,
9 16M FLASH_SIZE_128M_MAP_1024_1024

** Not supported, for "nodemcu" compatibility. I don't think FLASH_SIZE_32M... is right in Espressif's comment in my notes I have 512KB. Either way it should not be used.