Board logo

标题: 飞思卡尔杯---求助,中断向量错 。代码L1119???在线等。 [打印本页]

作者: lanhaigo    时间: 2007-6-27 16:15     标题: 飞思卡尔杯---求助,中断向量错 。代码L1119???在线等。

我在程序里想写一个时间中断函数,可是一直有错,希望能得到高手的帮助。

在主程序里中断函数这样写的:

interrupt 7 void My_Timer(void){

counter = counter1 + counter2;
......//这段代码是计数器的功能
}

prm文件:

/* This is a linker parameter file for the MC9S12DG128 */
NAMES END
SEGMENTS
RAM = READ_WRITE 0x0400 TO 0x1FFF;
/* unbanked FLASH ROM */
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xFEFF;
/* banked FLASH ROM */
PAGE_38 = READ_ONLY 0x388000 TO 0x38BFFF;
PAGE_39 = READ_ONLY 0x398000 TO 0x39BFFF;
PAGE_3A = READ_ONLY 0x3A8000 TO 0x3ABFFF;
PAGE_3B = READ_ONLY 0x3B8000 TO 0x3BBFFF;
PAGE_3C = READ_ONLY 0x3C8000 TO 0x3CBFFF;
PAGE_3D = READ_ONLY 0x3D8000 TO 0x3DBFFF;
END

PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */
_PRESTART,
STARTUP,
ROM_VAR,
STRINGS,
VIRTUAL_TABLE_SEGMENT,
NON_BANKED,
COPY INTO ROM_C000/*, ROM_4000*/;
DEFAULT_ROM INTO PAGE_38,PAGE_39,PAGE_3A,
PAGE_3B,PAGE_3C,PAGE_3D;
SSTACK,
DEFAULT_RAM INTO RAM;
END

ENTRIES
END

STACKSIZE 0x100

VECTOR 0 _Startup
VECTOR 7 RTI_fun


编译时一直出错,提示:
L1119: Vector allocated at absolute address 0xfff0 overlaps with sections placed in segment .absSeg336


并且,在MAP文件中写的是:
VECTOR-ALLOCATION SECTION
Address InitValue InitFunction
---------------------------------------------------------------------------------------------
0xFFF0 0x0'Error RTI_fun
0xFFFE 0x0'Error _Startup

望各位大侠,帮忙该一下!谢谢,在线等。
作者: strongchen    时间: 2007-6-27 17:01

你在函数interrupt 7 void My_Timer(void)定义中用了中断号7,在PRM文件中就不能再定义VECTOR 7 RTI_fun了。二者取其一。
作者: lanhaigo    时间: 2007-6-27 17:20

Thanks for strongchen !
the trouble 's gone.




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0