Page 1 of 1

Cached Code (irom0) RTOS_SDK Issue

Posted: Thu Sep 03, 2015 2:39 am
by ivanroberto
Hi comunity,

I am developing a product using the SDK RTOS.
According to the documentation 20A, it is no longer needed using and enjoying ICACHE_FLASH_ATTR before each function so that they are in IROM memory region.
However I noticed that after the last update (ESP_IOT_RTOS_SDK_V1.1.0_15_08_21) all functions are being allocated in IRAM memory even if you add ICACHE_FLASH_ATTR before each function.

Anyone else noticed this problem?

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Sat Sep 05, 2015 2:33 am
by eriksl
ICACHE_FLASH_ATTR?

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Sun Sep 06, 2015 12:30 pm
by ivanroberto
Yes, sorry.

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Sun Sep 06, 2015 3:38 pm
by eriksl
They are right in that it is not REQUIRED. If you have little code, it will work. If you're going to have a not-completely-tiny program, you will have to put it in the irom section anyway, that will always remain.

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Tue Sep 08, 2015 8:10 pm
by ivanroberto
Thanks for your replay,

Ok I understood, but my point is that I can't put my code in irom section (the ICHACHE_FLASH_ATTR doesn't work any more on v1.1.0_15_08_21). But it worked on old releases.

Thanks

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Wed Sep 09, 2015 4:41 pm
by khgoh
I also have the same problem. After further investigation, I found out that in c_type.h,
The original line in previous release,

#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))

has change to,

#define ICACHE_FLASH_ATTR

After I change it back according to the previous release, my program can compile without problem.

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Wed Sep 09, 2015 4:43 pm
by khgoh
Should be ctypes.h.

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Thu Sep 10, 2015 10:21 pm
by ivanroberto
Hi khgoh,

Thanks dude, it works for me too!!! :D
Now i get more than 5KB of free RAM :o

Just one new issue, my ESP8266 (station mode) doesn't connect with my router any more, I have to disable wifi encryption on the router...
Do you face it too? (this only happened after RTOS SDK update)

Thanks friend

Re: Cached Code (irom0) RTOS_SDK Issue

Posted: Fri Sep 18, 2015 7:43 am
by khgoh
Hi ivanroberto,
So far I did not face this problem with the latest RTOS SDK.