首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

PRM文件的问题吗?

PRM文件的问题吗?

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
ROM = READ_ONLY 0xC000 TO 0xFDFF;
Z_RAM = READ_WRITE 0x0040 TO 0x00FF;
RAM = READ_WRITE 0x0100 TO 0x023F;
END

PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
DEFAULT_RAM INTO RAM;
DEFAULT_ROM, ROM_VAR, STRINGS INTO ROM; /* In case you want to use as well, be sure the option -OnB=b is passed to the compiler. */
_DATA_ZEROPAGE, MY_ZEROPAGE INTO Z_RAM;
END


STACKSIZE 0x50

VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */

我的PRM文件如上所示,可是链接时却出现Vector allocated at absolute address 0xFFFE overlaps with sections placed in segment .absseg0的错误,为什么?

很奇怪的,因为在其它的工程里 所有.h和.c文件都是一样的
我只是把那些编译通过的.h和.c文件拷到我新建的工程里来编译就出现上面的问题了
那是因为你2次定义了复位中断矢量。去掉任意一个就可以了。
海纳百川  有容乃大
我把PRM文件中的VECTOR 0 _Startup去掉了,链接是通过了,但是仿真时,复位后跑到一个莫名其妙的位置,而不是MAIN函数的入口点那里,这是怎么回事呢
那你应该找到另一个定义复位矢量的地方,把那里去掉。
海纳百川  有容乃大
版主,我把我的PROJECT打包给你了,你看看,谢谢了。
你在这里面多定义了一个中断矢量。把最后一个去掉就可以啦。

void (* const _vect[])() @0xFFDC = { // Interrupt vector table
isrINT_TBM, /* Int.no. 0 INT_TBM (at FFDC) Used*/
UNASSIGNED_ISR, /* Int.no. 1 INT_SPITransmit (at FFDE) Unassigned*/
UNASSIGNED_ISR, /* Int.no. 2 INT_SPIReceive (at FFE0) Unassigned*/
UNASSIGNED_ISR, /* Int.no. 3 INT_ADC (at FFE2) Unassigned */
UNASSIGNED_ISR, /* Int.no. 4 INT_KBI (at FFE4) Unassigned */
UNASSIGNED_ISR, /* Int.no. 5 INT_SCITransmit (at FFE6) Unassigned */
UNASSIGNED_ISR, /* Int.no. 6 INT_SCIReceive (at FFE8) Unassigned */
UNASSIGNED_ISR, /* Int.no. 7 INT_SCIError (at FFEA) Unassigned */
UNASSIGNED_ISR, /* Int.no. 8 INT_TIMBOvr (at FFEC) Unassigned */
UNASSIGNED_ISR, /* Int.no. 9 INT_TIMBCH1 (at FFEE) Unassigned */
UNASSIGNED_ISR, /* Int.no. 10 INT_TIMBCH0 (at FFF0) Unassigned */
UNASSIGNED_ISR, /* Int.no. 11 INT_TIMAOvr (at FFF2) Unassigned */
UNASSIGNED_ISR, /* Int.no. 12 INT_TIMACH1 (at FFF4) Unassigned */
UNASSIGNED_ISR, /* Int.no. 13 INT_TIMACH0 (at FFF6) Unassigned */
UNASSIGNED_ISR, /* Int.no. 14 INT_ICG (at FFF8) Unassigned */
UNASSIGNED_ISR, /* Int.no. 15 INT_IRQ1 (at FFFA) Unassigned */
UNASSIGNED_ISR, /* Int.no. 16 INT_SWI (at FFFC) Unassigned */
//UNASSIGNED_ISR /* Int.no. 17 INT_RESET (at FFFE) Reset vector */
};

[此贴子已经被strongchen于2007-4-28 10:44:09编辑过]

海纳百川  有容乃大
谢谢版主。辛苦了
返回列表