Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By 0ff
#2020 Well I don't know which Makefile you're using but in some of mine this wasn't enabled.
It basically enables this in c_types.h:

Code: Select all#ifdef ICACHE_FLASH
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
#else
#define ICACHE_FLASH_ATTR
#endif /* ICACHE_FLASH */


-> i.e. it allows code, that is flagged with ICACHE_FLASH to be loaded from the flash, decreasing the size of iram1_0_seg. (If I'm not mistaken here, please correct me if I'm wrong!)

EDIT: Oh and you should add it to the clfags, as this is needed during compile time.
User avatar
By 0ff
#2026 Hm, you might try to just add ICACHE_FLASH to functions, so that they are moved to the other segment.
Of course this only applies to functions that are not flagged already, and if you are only using espressif sources, then that might be pretty much all of them
Do you store large amounts of strings somewhere, maybe?