-->
Page 2 of 3

Re: `.text' will not fit in region `iram1_0_seg' - what to d

PostPosted: Sat Dec 03, 2016 8:13 pm
by davydnorris
CARPP wrote:Okay, the solution was to copy the libgcc.a file from:

esp-open-sdk/ESP8266_NONOS/lib/

to

esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/4.8.5

Now everything is working fine! I can't believe it... :D


Glad you got it working! Next time you can just add the SDK include and lib directory to the compiler path and that should override the compiled lib without copying

Re: `.text' will not fit in region `iram1_0_seg' - what to d

PostPosted: Fri Dec 16, 2016 4:16 pm
by CARPP
The problem occurs again even though i already exchanged the libgcc.a files (as described in my last posts). Now my program includes around 300 lines of code. Do you have another idea or solution for this?

Re: `.text' will not fit in region `iram1_0_seg' - what to d

PostPosted: Sun Dec 18, 2016 8:47 pm
by davydnorris
CARPP wrote:The problem occurs again even though i already exchanged the libgcc.a files (as described in my last posts). Now my program includes around 300 lines of code. Do you have another idea or solution for this?


Do you have any detailed output from the build process? The RAM segment is actually very small so maybe you have too much code marked for RAM - most of it should really go into irom where it will be stored in flash, and only things like interrupt service routines should live in RAM.

Have you used the ICACHE_FLASH_ATTR directive on your own functions? That will move it out of iram and into irom

Re: `.text' will not fit in region `iram1_0_seg' - what to d

PostPosted: Wed Dec 21, 2016 2:07 pm
by CARPP
CFLAGS = -I. -DICACHE_FLASH -mlongcalls

fixed it for me :)