Till now I never worried too much about RAM size in my projects, but today I noticed this after compiling a rather large program:
Code: Select all
. Variables and constants in RAM (global, static), used 48480 / 80192 bytes (60%)
║ SEGMENT BYTES DESCRIPTION
╠══ DATA 1724 initialized variables
╠══ RODATA 13932 constants
╚══ BSS 32824 zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 61499 / 65536 bytes (93%)
║ SEGMENT BYTES DESCRIPTION
╠══ ICACHE 32768 reserved space for flash instruction cache
╚══ IRAM 28731 code in IRAM
. Code in flash (default, ICACHE_FLASH_ATTR), used 409604 / 1048576 bytes (39%)
║ SEGMENT BYTES DESCRIPTION
╚══ IROM 409604 code in flash
I tried to put some Serial.print statements in Flash with the 'F' macro. The 1st number -Variables and constants in RAM- lowered, but nothing happens to the Instruction RAM number.
So the questions are:
1 What is Instruction RAM?
2 what is the difference between the 2 RAM?
3 Should I worry that it is 93% upon compilation?
4 What to do to lower this number?
Thanks.
It is an ESP8266 NodeMCU ESP12F
Using arduino IDE 2.3.4