zchong 发表于 2009-9-20 08:24:48

ICF文件格式大解析

/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__      = 0x10000000;/*定义符号__ICFEDIT_intvec_start__ 的值为0x10000000,类似定义了一个变量*/
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__= 0x10000100;/*同上*/
define symbol __ICFEDIT_region_ROM_end__    = 0x107FFFFF;/*同上*/
define symbol __ICFEDIT_region_RAM_start__= 0x00200000;/*同上*/
define symbol __ICFEDIT_region_RAM_end__    = 0x00203FFF;/*同上*/
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__   = 0x500;/*同上*/
define symbol __ICFEDIT_size_svcstack__ = 0x100;/*同上*/
define symbol __ICFEDIT_size_irqstack__ = 0x100;/*同上*/
define symbol __ICFEDIT_size_fiqstack__ = 0x40;/*同上*/
define symbol __ICFEDIT_size_undstack__ = 0x40;/*同上*/
define symbol __ICFEDIT_size_abtstack__ = 0x40;/*同上*/
define symbol __ICFEDIT_size_heap__   = 0x500;/*同上*/
/**** End of ICF editor section. ###ICF###*/


define memory mem with size = 4G;/*定义了一个4G的可编址的存储空间*/
define region ROM_region = mem:;/*定义了一个存储区域,位于mem中,起始地址,结束地址*/
define region RAM_region = mem:;/*同上*/

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };/*定义了一个块,8字节对齐,大小为__ICFEDIT_size_cstack__*/
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__   { };

initialize by copy { readwrite };/*启动时初始化所有属性为readwrite的section*/
do not initialize{ section .noinit };/*启动时不要初始化.noinit段*/

place at address mem:__ICFEDIT_intvec_start__    { readonly section .intvec };/*将.intvec放置在mem中以__ICFEDIT_intvec_start__ 开始的地方*/

place in ROM_region   { readonly };/*所有readonly段放置在ROM_region中*/
place in RAM_region   { readwrite,
                        block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
                        block UND_STACK, block ABT_STACK, block HEAP };/*所有readwrite段和各种块放在RAM_region中*/

looker 发表于 2009-9-20 11:34:20

mark 非常感谢~~

yulri 发表于 2010-10-4 10:06:58

文件的配置含义我懂,只是不太清楚下面那些部分的取值,以及为什么要那样取,能说详细一点吗?

------------------------------
define symbol __ICFEDIT_intvec_start__      = 0x10000000;/*定义符号__ICFEDIT_intvec_start__ 的值为0x10000000,类似定义了一个变量*/
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__= 0x10000100;/*同上*/
define symbol __ICFEDIT_region_ROM_end__    = 0x107FFFFF;/*同上*/
define symbol __ICFEDIT_region_RAM_start__= 0x00200000;/*同上*/
define symbol __ICFEDIT_region_RAM_end__    = 0x00203FFF;/*同上*/
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__   = 0x500;/*同上*/
define symbol __ICFEDIT_size_svcstack__ = 0x100;/*同上*/
define symbol __ICFEDIT_size_irqstack__ = 0x100;/*同上*/
define symbol __ICFEDIT_size_fiqstack__ = 0x40;/*同上*/
define symbol __ICFEDIT_size_undstack__ = 0x40;/*同上*/
define symbol __ICFEDIT_size_abtstack__ = 0x40;/*同上*/
define symbol __ICFEDIT_size_heap__   = 0x500;/*同上*/
/**** End of ICF editor section. ###ICF###*/
----------------------
谢谢!

haigerl 发表于 2010-10-6 11:34:30

mark

TANK99 发表于 2011-11-17 21:37:35

学习

gzr_2011 发表于 2011-11-18 22:45:39

mark

WolfMvP 发表于 2012-6-14 15:49:14

从楼主提供的内容质量来看,只能作为小解析,料不多啊~
页: [1]
查看完整版本: ICF文件格式大解析