Need help to store some function definitions and debug print into Flash Memory

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Need help to store some function definitions and debug print into Flash Memory

Postby Ritesh » Fri Sep 01, 2017 1:35 am

Hi,

We are working on ESP-WROOM-02 module in which we are normally using printf statement for debugging purpose. So, we have lots of files and debug statement into each file for debugging purpose in our project.

We have seen like if we enable all debug statement into our project and if we print free heap size memory initially at that time we are getting almost 10 to 15 KBytes less heap size with compare to disabling debug printf.

So, We have e checked and found that normal printf statement will be stored into RAM instead of ROM memory. We have also check os_printf logic in which ICACHE_RODATA_ADDR has been used to store into rodata segment.

But, We have e also looked that if we don't defined any keyword into function definitions and declaration then by default it will store into Flash Memory. We have tried like that but it seems like still it is storing into RAM instead of Flash Memory. So, We have explicitly written ICACHE_FLASH_ADDR in all function definitions and then it works fine.

So, Would you please suggest us when RODATA will be used and when FLASH keyboards will be used as we are seeing abnormal behaviour after using that?

At the end, We just want to have free heap size to be more for our application development.

Looking forward some suggestions for this as well.
Regards,
Ritesh Prajapati

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Need help to store some function definitions and debug print into Flash Memory

Postby ESP_Sprite » Fri Sep 01, 2017 6:23 am

Are you sure you're on the right forum? WROOM02 has the ESP8266 chip, this forum is mostly about the ESP32.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to store some function definitions and debug print into Flash Memory

Postby Ritesh » Fri Sep 01, 2017 9:20 pm

ESP_Sprite wrote:Are you sure you're on the right forum? WROOM02 has the ESP8266 chip, this forum is mostly about the ESP32.
Yes. Question is for ESP-WROOM-02. Can you please let me know if you have any idea for this?

I have already tried to ask some questions into ESP8266 community but didn't get any answer or feedback yet. So that I have just tried to ask I to ESP32 community to get at least any feedback for that.

Does it not allow to ask ESP8266 related question here if it's critical for any customer and if he is not getting any reply into ESP8266 community?
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Bing [Bot] and 64 guests