[Resolved]section `.text' will not fit in region `iram1_0_seg' 编译出错,怎么调整段空间划分

clough2004
Posts: 9
Joined: Wed Jul 08, 2015 11:34 pm

[Resolved]section `.text' will not fit in region `iram1_0_seg' 编译出错,怎么调整段空间划分

Postby clough2004 » Mon Oct 19, 2015 12:02 pm

编译时出现如下错误
.output/eagle/debug/image/eagle.app.v6.out section `.text' will not fit in region `iram1_0_seg'
应该是text段划分空间不够吧,不知怎么调整,当前使用1MB的flash。

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

Re: section `.text' will not fit in region `iram1_0_seg' 编译出错,怎么调整段空间划分

Postby ESP_Faye » Tue Oct 20, 2015 9:58 am

您好,

内存有限,iram 无法再调整。

请在您自定义的函数前加上 ICACHE_FLASH_ATTR 定义,将其存放在 Flash 中,仅调用时才加载到 cache 运行。
例如,

Code: Select all

void ICACHE_FLASH_ATTR
user_test_start(void)
{
   ... ...
}


感谢您对 ESP8266 的关注!

clough2004
Posts: 9
Joined: Wed Jul 08, 2015 11:34 pm

Re: section `.text' will not fit in region `iram1_0_seg' 编译出错,怎么调整段空间划分

Postby clough2004 » Tue Oct 20, 2015 4:27 pm

谢谢了,明白了!

Espressif_Faye wrote:您好,

内存有限,iram 无法再调整。

请在您自定义的函数前加上 ICACHE_FLASH_ATTR 定义,将其存放在 Flash 中,仅调用时才加载到 cache 运行。
例如,

Code: Select all

void ICACHE_FLASH_ATTR
user_test_start(void)
{
   ... ...
}


感谢您对 ESP8266 的关注!

Who is online

Users browsing this forum: No registered users and 83 guests