You can chat about native SDK questions and issues here.

User avatar
By raspberrypidmx
#55870 With ESP8266_RTOS_SDK 1.4.2 , the #define ICACHE_FLASH_ATTR is empty. Hence, the code is not placed in .irom.text anymore.

According to the manual "ESP8266 RTOS SDK Programming Guide Version 1.4.0" -> "Since ESP8266_RTOS_SDK_v1.2.0, functions are stored in CACHE area by default, need not be added ICACHE_FLASH_ATTR any more."

When I compile my project with void user_init(void) , then I get the error :
build/app.out section `.text' will not fit in region `iram1_0_seg'

When I compile my project with void __attribute__((section(".irom0.text"))) user_init(void) , then the compile is going fine:
Generate user1.1024.new.2.bin successfully in folder firmware/upgrade

Seems to me that the function are not stored by default in CACHE area.

Please advice.

Thanks, Arjan
User avatar
By EkriirkE
#57423 The headers that define the `ICACHE_FLASH_ATTR` macro (in my build at least) requires that ICACHE_FLASH be defined first, so you can add the flag
Code: Select all-D ICACHE_FLASH
to your gcc commandline, or add
Code: Select all#define ICACHE_FLASH
to the top of your source file(s)