Chat freely about anything...

User avatar
By jadamcrain3
#37407 I am trying to get a C++ library running on esp8266, but am having trouble with the following linker message:

section `.text' will not fit in region `iram1_0_seg

Various searches have lead me to believe that the culprit is that my existing library doesn't use ICACHE_FLASH_ATTR on its functions. Annotating the every function in the existing library is a deal breaker... its just too big. I've gotten this library running on an 8-bit AVR w/ 8K of SRAM before, so this should be easy!

Are there any tricks I can use to tell the linker to put an entire set of things in flash w/o having to manually change an existing library.

thanks,
Adam
User avatar
By bouvrais
#40935
jadamcrain3 wrote:No, I never found an adequate solution. My library compiled just fine, but I was never able to resolve the memory issues.

I invite you to consult this forum entry which I created a few days ago. Basically I was having a similar issue. It turns out it is relatively easy to place your library in irom by editing you linker script (all credits go to dkinzer and jcmvbkbc).
Hope it helps.

JU