Compile summary question

After compilation of the same program for ESP8266, ESP32 and Pico W the final compilation summary is different fro ESP8266 from those for ESP32 and Pico W.

In ESP32 and Pico W the following lines appear respectively:

The sketch uses 849097 bytes (64%)  program storage. Maximum is 1310720 bytes.
Global variables use 52436 bytes (16%) of the dynamic memory and 275244 bytes for local variables. Maximum is 327680 bytes.
The sketch uses 450744 bytes (21%)  program storage. Maximum is 2093056 bytes.
Global variables use 76376 bytes (29%) of the dynamic memory. Remains 185768 bytes for local variables. Maximum is 262144 bytes.

ESP8266:

. Variables and constants in RAM (global, static), used 36680 / 80192 bytes (45%)
â•‘   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1588     initialized variables
╠══ RODATA   4884     constants       
╚══ BSS      30208    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 62827 / 65536 bytes (95%)
â•‘   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     30059    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 332572 / 1048576 bytes (31%)
â•‘   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     332572   code in flash   

While I understand the wording for the ESP32 and Pico W I cannot relate the ESP8266 compile summary to the program storage, global variables memory usage and maximum program storage size and maximum dynamic memory size as shown for the ESP32 and Pico W.

. Variables and constants in RAM (global, static), used 36680 / 80192 bytes (45%)

is equivalent to the Global variables line.

. Code in flash (default, ICACHE_FLASH_ATTR), used 332572 / 1048576 bytes (31%)

is equivalent to the program storage line.

Code cannot be executed in flash and must be copied to Instruction RAM to be executed. The line

.  Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 62827 / 65536 bytes (95%)

indicates how the Instruction Ram is configured.
ICACHE is used for code copied dynamically from flash for execution.
IRAM indicated code that is copied from flash and kept in instruction ram. Typically system code that controls the hardware and interrupt routines.

@oldcurmudgeon : fantastic, great answer, many thanks :slight_smile: !