Cached Code (irom0) RTOS_SDK Issue

ivanroberto
Posts: 14
Joined: Sat Nov 29, 2014 5:03 am

Cached Code (irom0) RTOS_SDK Issue

Postby ivanroberto » Thu Sep 03, 2015 2:39 am

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?
Last edited by ivanroberto on Sun Sep 06, 2015 12:37 pm, edited 1 time in total.

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: Cached Code (irom0) RTOS_SDK Issue

Postby eriksl » Sat Sep 05, 2015 2:33 am

ICACHE_FLASH_ATTR?

ivanroberto
Posts: 14
Joined: Sat Nov 29, 2014 5:03 am

Re: Cached Code (irom0) RTOS_SDK Issue

Postby ivanroberto » Sun Sep 06, 2015 12:30 pm

Yes, sorry.

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: Cached Code (irom0) RTOS_SDK Issue

Postby eriksl » Sun Sep 06, 2015 3:38 pm

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.

ivanroberto
Posts: 14
Joined: Sat Nov 29, 2014 5:03 am

Re: Cached Code (irom0) RTOS_SDK Issue

Postby ivanroberto » Tue Sep 08, 2015 8:10 pm

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

khgoh
Posts: 7
Joined: Thu Mar 19, 2015 11:14 am

Re: Cached Code (irom0) RTOS_SDK Issue

Postby khgoh » Wed Sep 09, 2015 4:41 pm

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.

khgoh
Posts: 7
Joined: Thu Mar 19, 2015 11:14 am

Re: Cached Code (irom0) RTOS_SDK Issue

Postby khgoh » Wed Sep 09, 2015 4:43 pm

Should be ctypes.h.

ivanroberto
Posts: 14
Joined: Sat Nov 29, 2014 5:03 am

Re: Cached Code (irom0) RTOS_SDK Issue

Postby ivanroberto » Thu Sep 10, 2015 10:21 pm

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

khgoh
Posts: 7
Joined: Thu Mar 19, 2015 11:14 am

Re: Cached Code (irom0) RTOS_SDK Issue

Postby khgoh » Fri Sep 18, 2015 7:43 am

Hi ivanroberto,
So far I did not face this problem with the latest RTOS SDK.

Who is online

Users browsing this forum: No registered users and 84 guests