-->
Page 1 of 1

Are Arduino sketches stored in flash or RAM of ESP8266?

PostPosted: Wed Jul 01, 2015 8:27 pm
by helpme
From the link below,
http://www.penninkhof.com/2015/03/how-t ... n-esp8266/

If you’re wondering what the ICACHE_FLASH_ATTR means in earlier example; it’s an instruction for the linker, indicating that the function should be stored in flash memory instead of RAM. It is generally advisable to prefix most functions with ICACHE_FLASH_ATTR in order to save RAM.


Given that Arduino sketches are not prefixed by ICACHE_FLASH_ATTR, are the code generated on Arduino IDE stored in RAM? If yes, wouldn't this be a waste of RAM and how to have it store in flash?

Re: Are Arduino sketches stored in flash or RAM of ESP8266?

PostPosted: Fri Oct 07, 2016 11:38 am
by electronicsguy
Did you get an answer to this?

Re: Are Arduino sketches stored in flash or RAM of ESP8266?

PostPosted: Fri Oct 07, 2016 11:42 am
by mrburnette
https://github.com/esp8266/esp8266-wiki/wiki/Memory-Map


Hint: EEPROM when power is off. When power is on, instructions are copied to the IRAM cache and data structures, variables, and such wind up in SRAM.

Ray