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

[求助]中断向量出错!请求帮助!

[求助]中断向量出错!请求帮助!

请问各位大侠!

我在编定时器中断的时,编译设计总是出错,出错代码:
L1119:Vector allocated at absolute address 0xFFFE overlaps with sections placed in segment .absSeg336.

我主程序(main.c)代码是:
#include
__interrupt void TOC7_ISR(void) {
PORTB ^= 0x01;
TFLG1 = 0x80;
}
#define timerValue 0xFFFF
void TOC7_Init(void){
asm sei
TIOS = 0x80;
TCTL1 &= 0x3F;
OC7M = 0x00;
TSCR2 = 0x0F;
TC7 = timerValue;
TIE = 0x80;
TSCR1 = 0x80;
asm cli
}
void main(void) {
DDRB = 0xff;
TOC7_Init();
asm cli
for(;;) {}
}

prm文件:
NAMES END
SEGMENTS
RAM = READ_WRITE 0x0400 TO 0x1FFF;
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xFEFF;
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
_PRESTART,
STARTUP,
ROM_VAR,
STRINGS,
VIRTUAL_TABLE_SEGMENT,
NON_BANKED,
COPY
INTO ROM_C000
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

望各位高手帮忙指教!谢谢!
中断函数要用以下声明放入非分页地址:

#pragma CODE_SEG __NEAR_SEG NON_BANKED
海纳百川  有容乃大
或者把 default_rom 放在rom_c000 或 rom_4000 里
返回列表