out section `.rodata' will not fit in region `dram0_0_seg'????

Garvey
Posts: 1
Joined: Mon Jan 25, 2016 11:11 pm

out section `.rodata' will not fit in region `dram0_0_seg'????

Postby Garvey » Mon Jan 25, 2016 11:35 pm

I have a ESP8266-12E chip with 32Mbit(4MB) Flash. I got the error:"out section `.rodata' will not fit in region `dram0_0_seg'" when I compiled my source file. Beacause there's large arry in the source file just like this : const unsigned html[102400]={.......};
there are my questions:
1.Is dram_seg in the SPI Flash???
2.Can I change the "eagle.app.v6.ld" file to fix the error??
MEMORY
{
dport0_0_seg : org = 0x3FF00000, len = 0x10
dram0_0_seg : org = 0x3FFE8000, len = 0x14000
iram1_0_seg : org = 0x40100000, len = 0x8000
irom0_0_seg : org = 0x40240000, len = 0x32000
}
I've tried to change the dram0_0_seg's "len" from 0x14000 to 0x2000,it can be compiled successfully but the .bin file can not run in my chip。 3.can I define a large arry in my source file which is larger than 100K?(cause I have 4MB SPI Flash on the board )
4.how can I fix this problem.
Thank you very muck if you can answer my question.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: out section `.rodata' will not fit in region `dram0_0_seg'????

Postby ESP_Faye » Wed Jan 27, 2016 4:34 pm

Hi,

If you have to define an array that is very large, please put it into Flash, like:

Code: Select all

static const char XXXX[] ICACHE_RODATA_ATTR = { ........ }


Notice that Flash Read/Write has to be 4 bytes aligned so the array has to be type uint32.

Thanks for your interest in ESP8266!

Who is online

Users browsing this forum: No registered users and 190 guests