gaolf_2012 发表于 2015-4-17 10:55:03

kl25z64使用IAR自带的ICF文件编译报错,请问如何解决?

kl25z64原来使用IAR6.4,现在使用IAR7.3后ICF文件不用过去的FREEDOM版本,使用IAR自带的ICF文件编译报错


Error: no definition for "__VECTOR_RAM"

Error: no definition for "__VECTOR_TABLE"

Error: no definition for "__BOOT_STACK_ADDRESS"


请问如何解决?

FSL_TICS_Robin 发表于 2015-4-17 11:12:52

如果你用的是飞思卡尔官网提供的KL25_SC里程序,那么程序在启动时(startup.c里)需要这些区域的定义。
你可以改写那个icf,或者用老的icf

gaolf_2012 发表于 2015-4-17 11:59:01

把IAR7.3里带的新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__ = 0x00000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
define symbol __ICFEDIT_region_ROM_end__   = 0x0000ffff;
define symbol __ICFEDIT_region_RAM_start__ = 0x1ffff800;
define symbol __ICFEDIT_region_RAM_end__   = 0x1fffffff;



define exported symbol __VECTOR_RAM      = 0x1ffff800;   //我增加的

define exported symbol __VECTOR_TABLE      = 0x00000000;   //我增加的

define exported symbol __BOOT_STACK_ADDRESS = 0x200017f0;   //我增加的



/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__   = 0x800;
/**** End of ICF editor section. ###ICF###*/

define symbol __region_RAM2_start__                 = 0x20000000;
define symbol __region_RAM2_end__                         = 0x200017ff;

define symbol __FlashConfig_start__                        = 0x00000400;
define symbol __FlashConfig_end__                   = 0x0000040f;

define memory mem with size = 4G;
define region ROM_region = mem: | mem:;
define region RAM_region = mem: | mem:;

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

define region FlashConfig_region = mem:;

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

place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place in FlashConfig_region {section FlashConfig};

place in ROM_region   { readonly };

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

gaolf_2012 发表于 2015-4-17 12:08:22

忘记说了,硬件及程序使用IAR6.4都正常

FSL_TICS_Robin 发表于 2015-4-17 14:52:11

gaolf_2012 发表于 2015-4-17 11:59
把IAR7.3里带的新ICF文件改写如下后,程序莫名复位,唉

/*###ICF### Section handled by ICF editor, don' ...

建议你下载一天攻破K60/KL26 PDF教程分享【集齐 视频、PDF、书、代码】帖子里那个   一天攻破K60_KL26.pdf 文档。

参考18/231页对于icf各段介绍,结合原来64K那个icf在新的icf上进行修改。

jiang887786 发表于 2015-4-17 15:33:16

看上去蛮麻烦的,楼主努力啊!出点教程给大家分享一下。

FSL_TICS_Robin 发表于 2015-4-30 10:02:41

非常感谢你关于Kinetis的技术问题。如果你没有其他问题,我们将此帖默认为已解决.

jiamingz 发表于 2015-4-30 10:27:26

E问不是说没有定义吗?
页: [1]
查看完整版本: kl25z64使用IAR自带的ICF文件编译报错,请问如何解决?