Chat freely about anything...

User avatar
By cal
#21245
eriksl wrote:Yes agree. I ended up marking nearly all of my functions with the irom attribute (which is very misleadingly called "ICACHE_FLASH_ATTR" and imho suggests the function will be cached in RAM which ultimately is NOT the case, the absence attribute does that!)


Hmmm no.
The attribute means that it is stored in and run from flash using a 32k ram cache.
Without it it is run from 32k instruction ram.
The former is called irom, the later iram.
Interrupt called code and flash controlling code must me run from iram.

Cal
User avatar
By scargill
#21271 Interesting you say that Cal... I'm running the backup and restore - using Espressif routines - using the prefix to hold the code in Flash.

See below..

void ICACHE_FLASH_ATTRCFG_Load()
{

iprintf(DEBUG,"\r\nConfig load ...\r\n");
system_param_load(CFG_LOCATION,0,(uint32 *)&sysCfg, sizeof(SYSCFG));
if(sysCfg.cfg_holder != CFG_HOLDER){