New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

region `iram1_0_seg' overflowed by 1000 bytes #228

Closed
GreatProjects opened this Issue Dec 1, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@GreatProjects
Copy link

GreatProjects commented Dec 1, 2016

If i try to build my project i get this output:

xtensa-lx106-elf-gcc -I. -mlongcalls -c -o segmentled.o segmentled.c
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
: recipe for target 'segmentled' failed
make: *** [segmentled] Error 1

Even though my code is not very long (just about 200 lines). I added "ICACHE_FLASH_ATTR" in front of every function. Do you have any idea, how i can fix this error? Any help would be very much appreciated.

@cranphin

This comment has been minimized.

Copy link

cranphin commented Dec 2, 2016

I expect the actual code would help here.

@GreatProjects

This comment has been minimized.

Copy link
Author

GreatProjects commented Dec 2, 2016

Ok, here is my code:

http://pastebin.com/KGWU4d71

@pepe79

This comment has been minimized.

Copy link

pepe79 commented Dec 17, 2016

I fixed the same error by adding -DICACHE_FLASH to the CFLAGS variable in the Makefile:
CFLAGS = -I. -DICACHE_FLASH -mlongcalls
as suggested in #82

@GreatProjects

This comment has been minimized.

Copy link
Author

GreatProjects commented Dec 17, 2016

Thanks for your reply, sadly, this didn't do anything. I still get the same error :(
This is my Makefile: http://pastebin.com/Mpd03uAr

@pepe79

This comment has been minimized.

Copy link

pepe79 commented Dec 17, 2016

You forgot the minus sign before DICACHE_FLASH. I tested your code with my Makefile and it works (without -DICACHE_FLASH it doesn't).

@GreatProjects

This comment has been minimized.

Copy link
Author

GreatProjects commented Dec 17, 2016

Thanks a lot! Now everything works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment