ESP8266 Developer Zone The Official ESP8266 Forum 2017-03-22T19:12:35+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=3164 2017-03-22T19:12:35+08:00 2017-03-22T19:12:35+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=11548#p11548 <![CDATA[Re: `.text' will not fit in region `iram1_0_seg']]>
pratik wrote:
Please use ICACHE_FLASH_ATTR in all your functions. That is what will place them in flash.
Your functions are getting placed in the iRAM... it is RAM and is in a few KBs only!


Thanks a lot Pratik, your suggestion worked out!

Statistics: Posted by rajkumar patel — Wed Mar 22, 2017 7:12 pm


]]>
2016-12-18T05:23:36+08:00 2016-12-18T05:23:36+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=10919#p10919 <![CDATA[Re: `.text' will not fit in region `iram1_0_seg']]>

-DICACHE_FLASH
after

CFLAGS = -I.
in the Makefile did it for me.

Statistics: Posted by Stational — Sun Dec 18, 2016 5:23 am


]]>
2016-12-17T05:13:49+08:00 2016-12-17T05:13:49+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=10914#p10914 <![CDATA[Re: `.text' will not fit in region `iram1_0_seg']]>

LOCAL void ICACHE_FLASH_ATTR


in front of all my functions but the message is still the same:


xtensa-lx106-elf-gcc -I. -mlongcalls -c -o sensor.o sensor.c
xtensa-lx106-elf-gcc -Teagle.app.v6.ld sensor.o -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc -o sensor
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: sensor section `.text' will not fit in region `iram1_0_seg'
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 344 bytes
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'sensor' failed
make: *** [sensor] Error 1


Could you explain how i fix this problem and how it is caused, please?

Statistics: Posted by Stational — Sat Dec 17, 2016 5:13 am


]]>
2016-12-11T12:15:54+08:00 2016-12-11T12:15:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=10858#p10858 <![CDATA[Re: `.text' will not fit in region `iram1_0_seg']]> Your functions are getting placed in the iRAM... it is RAM and is in a few KBs only!

Statistics: Posted by Guest — Sun Dec 11, 2016 12:15 pm


]]>
2016-12-09T05:17:08+08:00 2016-12-09T05:17:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=10847#p10847 <![CDATA[Re: `.text' will not fit in region `iram1_0_seg']]>
could you tell me where i find the LD-files and how i should modify them? SDK is 2.0.0_16_08_10, i use the esp-open-sdk on debian 8.6 64-bit.
I moved the libgcc.a file from:
esp-open-sdk/ESP8266_NONOS/lib/
to
esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5
This helped a bit. I am working on a bigger project right now (~200 lines of code) and i am alredy running against the bound again! I don't understand why this happens, i thought the ESP-12F has 4MB of flash (which is a lot, i think...).

Best regards

Max

Statistics: Posted by Stational — Fri Dec 09, 2016 5:17 am


]]>
2016-12-04T20:35:12+08:00 2016-12-04T20:35:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=10768#p10768 <![CDATA[Re: `.text' will not fit in region `iram1_0_seg']]> Also, note that mbedTLS based builds must use the LD file provided by Espressif (otherwise you have to relocate code to iCache in your LD file).
Also, please specify the SDK version and your environment setup details so that it is easier to track the issue down.

Statistics: Posted by Guest — Sun Dec 04, 2016 8:35 pm


]]>
2016-12-03T03:25:06+08:00 2016-12-03T03:25:06+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3164&p=10760#p10760 <![CDATA[`.text' will not fit in region `iram1_0_seg']]>
if i try to build my project with the esp-open-sdk i get this error:


xtensa-lx106-elf-gcc -Teagle.app.v6.ld segmentled.o -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc -o segmentled
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: segmentled section `.text' will not fit in region `iram1_0_seg'
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 1000 bytes
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'segmentled' failed
make: *** [segmentled] Error 1


My code isn't very long (~250 lines). Why does this happen and how can i fix it?

Statistics: Posted by Stational — Sat Dec 03, 2016 3:25 am


]]>