Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By helpme
#22396 The Sming main app code is not prefixed with ICACHE_FLASH_ATTR. Does this mean that the code is may run out of space more easily even if I am using a module with plenty of flash space? To ensure sufficient space, should I add ICACHE_FLASH_ATTR to the user functions in my main app?

My understanding is that functions not prefixed with ICACHE_FLASH_ATTR will be saved in RAM and not flash. RAM is a much scarcer resource compared to flash in ESP8266.
User avatar
By helpme
#22549 I just got Sming framework working on CHERTS unofficial Devkit today. I am using NodeMCU Amica development kit. I programmed in the Basic_Blink app into the ESP8266 module. For some reason, the module has to wait around 30 seconds for the LED to start blinking for the very first time after flashing upon power-up. For subsequent power-ups, the LED starts blinking immediately. Has anyone encountered the same issue? It is strange.
User avatar
By Markus Gritsch
#22552
helpme wrote:The Sming main app code is not prefixed with ICACHE_FLASH_ATTR. Does this mean that the code is may run out of space more easily even if I am using a module with plenty of flash space? To ensure sufficient space, should I add ICACHE_FLASH_ATTR to the user functions in my main app?

My understanding is that functions not prefixed with ICACHE_FLASH_ATTR will be saved in RAM and not flash. RAM is a much scarcer resource compared to flash in ESP8266.


You could have at least searched this topic for ICACHE_FLASH_ATTR. It would have given you this result:
viewtopic.php?f=6&t=2133&start=110#p17320
User avatar
By kenn
#22569
helpme wrote: I programmed in the Basic_Blink app into the ESP8266 module. For some reason, the module has to wait around 30 seconds for the LED to start blinking for the very first time after flashing upon power-up. For subsequent power-ups, the LED starts blinking immediately. Has anyone encountered the same issue? It is strange.


I expect that on your first boot, the ESP8266 was going through its wifi setup and connecting, and saving the config. In subsequent boots. it simply loads that config, which is alot faster.