在线时间0 小时
UID106919
注册时间2009-2-2
NXP金币0
该用户从未签到
新手上路

- 积分
- 36
- 最后登录
- 1970-1-1
|
各位高手:
我最近在做ucosii在xep100上的移植,不使用xgate,使用以下这个中断向量表:
#pragma CONST_SEG __NEAR_SEG OS_VECTOR_TABLE
void (* near const _vectab[])() =
{
/* ff3c*/
Unhandled,
/* ff3e*/
Unhandled,
……
……
/* fff0: RealTimeInterrupt */
rti_handled,
/* fff2: IRQ */
Unhandled,
/* fff4: XIRQ */
Unhandled,
/* fff6: SWI */
OSCtxSw,
/* fff8: UnimplementedInstruction */
Unhandled,
/* fffa: COP_FailureReset */
Unhandled,
/* fffc: ClockMonitorFailReset */
Unhandled,
/* fffe: Reset */
_startup,
};
同时修改。prm文件如下:
/* non-banked FLASH */
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xFEFF;
/* VECTORS = READ_ONLY 0xFF00 TO 0xFFFF; intentionally not defined: used for VECTOR commands below */
OSVECTORS = READ_ONLY 0xFF10 TO 0xFFFF; /* OSEK interrupt vectors (use your vector.o) */
/* paged EEPROM 0x0800 TO 0x0BFF; addressed through EPAGE */
EEPROM_FC = READ_ONLY 0xFC0800 TO 0xFC0BFF;
EEPROM_FD = READ_ONLY 0xFD0800 TO 0xFD0BFF;
EEPROM_FE = READ_ONLY 0xFE0800 TO 0xFE0BFF;
/* EEPROM_FF = READ_ONLY 0xFF0800 TO 0xFF0BFF; intentionally not defined: equivalent to EEPROM */
……
……
PAGED_RAM INTO /* when using banked addressing for variable data, make sure to specify
the option -D__FAR_DATA on the compiler command line */
RAM_F0, RAM_F1, RAM_F2, RAM_F3, RAM_F4, RAM_F5, RAM_F6, RAM_F7,
RAM_F8, RAM_F9, RAM_FA, RAM_FB, RAM_FC, RAM_FD;
OS_VECTOR_TABLE INTO OSVECTORS; /* OSEK vector table */
END
ENTRIES /* keep the following unreferenced variables */
/* OSEK: always allocate the vector table and all dependent objects */
//_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart
END
STACKSIZE 0x100 /* size of the stack (will be allocated in DEFAULT_RAM) */
/* use these definitions in plane of the vector table ('vectors') above */
//VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */
现象是:在全仿真模式下,在执行swi命令后没有进入中断,reset复位以后没有进入 _startup 而是跑飞了!
我的问题是,我只想用这种中断向量表的方式实现中断,那么我的。prm文件设置是否正确?我应该如何设置和修改?在程序的其他地方我还需要做什么吗?
谢谢!!!
|
|