Failing to compile old project - section `.text' will not fit in region `iram1_0_seg'

The project is available at (note the branch, master works fine, but BSEC_only is the one with the issue).

When the code was committed (April 29) there were no issues and everything was compiling fine. I had two boards working for over a month with it. A few days ago I tried to program a few more boards, but I got the following failure:

Linking .pioenvs/d1_mini/firmware.elf
/home/brum/.platformio/packages/toolchain-xtensa/bin/…/lib/gcc/xtensa-lx106-elf/4.8.2/…/…/…/…/xtensa-lx106-elf/bin/ld: .pioenvs/d1_mini/firmware.elf section .text' will not fit in region iram1_0_seg’
collect2: error: ld returned 1 exit status
*** [.pioenvs/d1_mini/firmware.elf] Error 1

The project uses a library provided by Bosch named BSEC. It is needed for proper work of the BME680 sensor that is used for AQ monitoring. I’m not sure what changed, but the IDE (Visual Studio Code) that was last used in April asked for some updates and I just clicked YES. After that I hit the ‘Build’ button and the above error popped up. I’ve tried to resolve the issue for a few days now, but with no luck. Tried with older version of the framework, checked several packages for changes in the last few months - zero success. If I comment part of the code interacting with the BSEC library - it compiles, but without that library there functionality is quite incomplete. So I’m stuck now!

Any help is greatly appreciated!

Did you redo the changes mentioned in step no 5 in the link??

Any updates to the platform will override the changes you might have made earlier…
It is a known fix for the ESP8266.

1 Like

Good catch! This was the issue.

I’m updating my this time to keep track on this.

glad to be of some help. :slight_smile: