-->
Page 3 of 3

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

PostPosted: Wed Dec 21, 2016 8:09 pm
by davydnorris
CARPP wrote:CFLAGS = -I. -DICACHE_FLASH -mlongcalls

fixed it for me :)


This effecively moves ALL your code into flash, which may be ok depending on what you are doing, but just be wary of functions that are long lived or that need to operate at low level.

If you get resets and timeouts, this should be the first place to look

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

PostPosted: Thu Dec 22, 2016 11:13 am
by CARPP
Oh, i didn't know that. I tagged every function (besides user_init()) with :
ICACHE_FLASH_ATTR

but the amount of ram i was overextending was always the same without -DICACHE_FLASH (it also didn't change if i untagged all functions). Only with -DICACHE_FLASH my program successfully compiled.

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

PostPosted: Thu Dec 22, 2016 7:04 pm
by davydnorris
CARPP wrote:Oh, i didn't know that. I tagged every function (besides user_init()) with :
ICACHE_FLASH_ATTR

but the amount of ram i was overextending was always the same without -DICACHE_FLASH (it also didn't change if i untagged all functions). Only with -DICACHE_FLASH my program successfully compiled.


Oh ok - I'll have to check that out. Been ages since I looked at my own compiler settings!

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

PostPosted: Fri Apr 28, 2017 11:50 pm
by rijuroymon
Thanks guys...