-->
Page 2 of 3

Re: Xtensa Linker (LD) produce RAM usage

PostPosted: Tue Oct 28, 2014 6:19 pm
by johnnyfp
I've added that to the Linker Options and nothing happens. What's it's supposed to do?

Re: Xtensa Linker (LD) produce RAM usage

PostPosted: Tue Oct 28, 2014 6:25 pm
by 0ff
Well I don't know which Makefile you're using but in some of mine this wasn't enabled.
It basically enables this in c_types.h:

Code: Select all#ifdef ICACHE_FLASH
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
#else
#define ICACHE_FLASH_ATTR
#endif /* ICACHE_FLASH */


-> i.e. it allows code, that is flagged with ICACHE_FLASH to be loaded from the flash, decreasing the size of iram1_0_seg. (If I'm not mistaken here, please correct me if I'm wrong!)

EDIT: Oh and you should add it to the clfags, as this is needed during compile time.

Re: Xtensa Linker (LD) produce RAM usage

PostPosted: Tue Oct 28, 2014 6:32 pm
by johnnyfp
Ah I See. This looks like it's enabled in the stock Makefile.

I'm using the IoTDemo Makefile from v0.9.2

Re: Xtensa Linker (LD) produce RAM usage

PostPosted: Wed Oct 29, 2014 4:14 am
by 0ff
Hm, you might try to just add ICACHE_FLASH to functions, so that they are moved to the other segment.
Of course this only applies to functions that are not flagged already, and if you are only using espressif sources, then that might be pretty much all of them
Do you store large amounts of strings somewhere, maybe?