YimingLi wrote:lijay910 wrote:您好,怎么解决的?
我在大部分函数前加了ICACHE_FLASH_ATTR,还是报section `.text' will not fit in region `iram1_0_seg'
因为iram1_0_seg空间有限,只有0x8000=32KBytes,如果采用上述做法之后,依然提示这个错误,那么可以进一步,将所有或部分的const常数,通过在声明处加上“ICACHE_RODATA_ATTR STORE_ATTR” ,也放置到flash里不要驻留iram0_1,例如:const char abc[] ICACHE_RODATA_ATTR STORE_ATTR = "Welcom to Espressif";
ps: 常量也包括诸如 os_sprintf(my_str, "welcome to %s", company_name);里面的引号中间部分。所以,尽量少用这类函数,以免太多之后,增加对iram1_0_seg空间的显著占用;或者更换其他方式使用(例如机智云的参考代码中,定义了一个Gizwits_print函数,就很好的的解决了这个问题)。
希望可以帮到你。
Statistics: Posted by Guest — Mon Oct 16, 2017 11:29 am
Statistics: Posted by Guest — Mon Oct 16, 2017 11:23 am
Statistics: Posted by Guest — Mon Oct 16, 2017 11:14 am
Statistics: Posted by lijay910 — Sat Oct 14, 2017 2:02 pm
lijay910 wrote:您好,怎么解决的?
我在大部分函数前加了ICACHE_FLASH_ATTR,还是报section `.text' will not fit in region `iram1_0_seg'
Statistics: Posted by lijay910 — Sat Oct 14, 2017 11:36 am
Statistics: Posted by Guest — Thu Oct 05, 2017 10:40 pm
Statistics: Posted by lijay910 — Wed Oct 04, 2017 6:27 pm
Statistics: Posted by pillarpeng — Wed Jan 04, 2017 11:00 am
Statistics: Posted by vowstar — Tue Sep 27, 2016 11:09 am
Statistics: Posted by bobo_zhou — Mon Jun 29, 2015 7:46 pm