Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By picstart
#11973
void ICACHE_FLASH_ATTR
user_init()

Questions
1)
ICACHE_FLASH_ATTR appears to be some pragma that places the following subroutine into external 512K byte flash but where would the code be placed if it the pragma was
omitted?
2)
If a character array is declared as
static const uint8_t ASCII[][5] =
does it get stored in external 512k byte flash if not where?
User avatar
By joostn
#12000 There's a 32k section of RAM which is filled with a corresponding section from flash (iram1) upon startup. By default code goes here. The code will run fast and you can safely use it in ISR but space is very limited.

You can have all code by default go into flash, a.o. see this post:
viewtopic.php?f=9&t=224&start=150

For your second question see:
viewtopic.php?f=13&t=2006