ESP8266 Developer Zone The Official ESP8266 Forum 2017-10-26T17:42:32+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=7050 2017-10-26T17:42:32+08:00 2017-10-26T17:42:32+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7050&p=16739#p16739 <![CDATA[Re: section `.text' will not fit in region `iram1_0_seg']]>
-Wl,-gc-sections

to the LDFLAGS.

Statistics: Posted by blubb — Thu Oct 26, 2017 5:42 pm


]]>
2017-10-26T14:01:18+08:00 2017-10-26T14:01:18+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7050&p=16736#p16736 <![CDATA[Re: section `.text' will not fit in region `iram1_0_seg']]>

If you are using any user-defined lib,when generating those libs, you can add the flags below which marked red in the makefile to save some RAM.

CCFLAGS += \
-g\
-Wpointer-arith\
-Wundef\
-Werror\
-Wl,-EL\
-fno-inline-functions\
-nostdlib \
-mlongcalls\
-mtext-section-literals \
-ffunction-sections \
-fdata-sections\

-fno-builtin-printf\
-fno-jump-tables
#-Wall

Statistics: Posted by Her Mary — Thu Oct 26, 2017 2:01 pm


]]>
2017-10-25T16:07:03+08:00 2017-10-25T16:07:03+08:00 https://bbs.espressif.com:443/viewtopic.php?t=7050&p=16709#p16709 <![CDATA[section `.text' will not fit in region `iram1_0_seg']]> At version 2.0 of the SDK I was sailing along with hundreds of bytes of RAM left for code.... and yes I put all my functions into FLASH and have taken all the usual precautions..

However, by 2.1 of the SDK I am back to square one with the old "section `.text' will not fit in region `iram1_0_seg'".

There is nothing more I can do with my code to save space.

I note however that at the bottom of the README file is something about removing RAM-using functions - as they are already in ROM....

instructions are simple enough.

cp $(TOOLCHAIN)/lib/gcc/xtensa-lx106-elf/<version>/libgcc.a .
xtensa-lx106-elf-ar -M < strip_libgcc_funcs.txt

cp $(TOOLCHAIN)/xtensa-lx106-elf/lib/libc.a .
xtensa-lx106-elf-ar -M < strip_libc_funcs.txt

However they ASSUME knowledge of MAKEFILE - and presumably a particular variety of MAKEFILE

I am using a MAKEFILE in Windows 10 using the Eclipse-based environment and haven't a CLUE where to put that info - ( also have no reference in my MAKEFILE to "TOOLCHAIN". Can anyone help.

I would include my MAKEFILE here with the attachments tool but it neither wants to accept a textfile or just the makefile itself. Here's a link to a renamed makefile (makefile.txt) if anyone has a moment to take a look... https://www.dropbox.com/s/ooaw7i2cyg3fo ... e.txt?dl=0

I'm pretty good at C but pretty poor at Makefiles unfortunately.

Statistics: Posted by scargill — Wed Oct 25, 2017 4:07 pm


]]>