各位大侠,现在想STM32的内部RAM不够用,想扩展一片外部的SRAM,编译平台使用IAR FOR ARM 5.30,发现使用配置文件stm32f10x_flash_extsram.icf后,编译出来的文件没有使用内部的RAM,现在的问题就是如何让编译器先用内部RAM,用关键字来让特定的数组放到外部ram?这个问题比较急,求各位帮帮忙,谢谢。
----------------------------------'-' 方法扩展SRAM------------------------------
define region RAM_region
= mem:[from 0x20000000 to 0x680FFFFE]
-mem:[from 0x2000FFFF to 0x67FFFFFF];
对应的map文件:
"P3": place in [from 0x20000000 to 0x2000fffe] |
[from 0x68000000 to 0x680ffffe] { rw, block CSTACK, block HEAP };
define region RAM_region
= mem:[from 0x20000000 to 0x680FFFFF]
-mem:[from 0x2000FFFF to 0x67FFFFFF];;
对应的map文件:
"P3": place in [from 0x20000000 to 0x2000fffe] |
[from 0x68000000 to 0x680fffff] { rw, block CSTACK, block HEAP };
define region RAM_region
= mem:[from 0x20000000 to 0x680FFFFF]
-mem:[from 0x2000FFFF to 0x68000000];
对应的map文件:
"P3": place in [from 0x20000000 to 0x2000fffe] |
[from 0x68000001 to 0x680fffff] { rw, block CSTACK, block HEAP };
--------------改成这样才可以-------------
define region RAM_region
= mem:[from 0x20000000 to 0x680FFFFF]
-mem:[from 0x20010000 to 0x67FFFFFF];
对应的map文件:
"P3": place in [from 0x20000000 to 0x2000ffff] |
[from 0x68000000 to 0x680fffff] { rw, block CSTACK, block HEAP };
-----------------------------------'|' 方法扩展SRAM-------------------------------
define region RAM_region
= mem:[from 0x20000000 to 0x2000FFFF]
| mem:[from 0x68000000 size 0x100000];
对应的map文件:
"P3": place in [from 0x20000000 to 0x2000ffff] |
[from 0x68000000 to 0x680fffff] { rw, block CSTACK, block HEAP };