打印
[STM32F4]

在 STM32F429 上,IAR 中如何将堆(HEAP)设置到外部SDRAM?

[复制链接]
947|5
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
jacklow|  楼主 | 2019-8-21 20:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
搜索网上资料,对 icf 进行了调整,编译可以通过,但实际运行时死机,不知道哪位大师成功设置过
下面是我设置的icf内容:
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__    = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__      = 0x080FFFFF;
define symbol __ICFEDIT_region_RAM_start__    = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__      = 0x2003ffff;
define symbol __ICFEDIT_region_RAM1_start__   = 0xD0700000;
define symbol __ICFEDIT_region_RAM1_end__     = 0xD07fffff;
define symbol __ICFEDIT_region_CCMRAM_start__ = 0x10000000;
define symbol __ICFEDIT_region_CCMRAM_end__   = 0x1000FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x1000;
define symbol __ICFEDIT_size_heap__   = 0x80000;
/**** End of ICF editor section. ###ICF###*/


define memory mem with size = 4G;
define region ROM_region      = mem:[from __ICFEDIT_region_ROM_start__   to __ICFEDIT_region_ROM_end__];
define region RAM_region      = mem:[from __ICFEDIT_region_RAM_start__   to __ICFEDIT_region_RAM_end__] | mem:[from __ICFEDIT_region_RAM1_start__   to __ICFEDIT_region_RAM1_end__];
define region CCMRAM_region   = mem:[from __ICFEDIT_region_CCMRAM_start__   to __ICFEDIT_region_CCMRAM_end__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize by copy { readwrite };
do not initialize  { section .noinit };

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at address mem:__ICFEDIT_region_RAM_start__ { readwrite section .data };
place at address mem:__ICFEDIT_region_RAM1_start__ { readwrite section .bss };

place in ROM_region   { readonly };
place in RAM_region   { readwrite, block CSTACK, block HEAP };                        

使用特权

评论回复
沙发
jacklow|  楼主 | 2019-8-21 20:38 | 只看该作者
SDRAM在RAM1,首地址为 0xD0000000, 大小为 0x800000, 我想将 HEAP 设置到 0xD0700000 ~ 0xD07FFFFF,并未超过范围

使用特权

评论回复
板凳
keaibukelian| | 2019-9-19 12:01 | 只看该作者
不是很了解

使用特权

评论回复
地板
paotangsan| | 2019-9-19 12:05 | 只看该作者
icf文件是干嘛用的啊

使用特权

评论回复
5
labasi| | 2019-9-19 12:32 | 只看该作者
不知道怎么做

使用特权

评论回复
6
木木guainv| | 2019-9-19 12:56 | 只看该作者
不太了解这个文件

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

14

主题

33

帖子

0

粉丝