dp512_ucos.rar (388.97 KB)
按书本移植一个UCOS系统,用CW4.6编译出现初始化向量失败,求高手看下怎么解决。linker.prm里最后加入了VECTOR ADDRESS 0xFFF0 OSTickISR
VECTOR ADDRESS 0xFFF8 OSCtxSw两句话。具体源码见附件
OS_CPU_A.ASM文件如下:
PUBLIC OSStartHighRdy
PUBLIC OSIntCtxSw
PUBLIC OSTickISR
PUBLIC OSCtxSw
XREF OSIntExit
XREF OSIntEnter
XREF OSTimeTick
XREF OSTaskSwHook
XREF OS_SAVE_SP
XREF OSIntNesting
XREF OSTickDOSCtr
XREF OSPrioHighRdy
XREF OSPrioCur
XREF OSRunning
XREF OSTCBCur
XREF OSTCBHighRdy
OSTickISR
ldaa $30
psha
CALL OSIntEnter
CALL OS_SAVE_SP
;CRGFLG_RTIF=1;
BCLR $39,#$80
CALL OSTimeTick
CALL OSIntExit
pula
staa $30
nop
rti
OSCtxSw
ldaa $30
psha
ldx OSTCBCur
sts 0,x
CALL OSTaskSwHook
LDX OSTCBHighRdy
STX OSTCBCur
LDAB OSTCBHighRdy
STAB OSPrioCur
;OSTCBCur=OSTCBHighRdy ;// ; OSTCBCur = OSTCBHighRdy
;OSPrioCur= OSPrioHighRdy ;// ; OSPrioCur = OSPrioHighRdy
ldx OSTCBCur
lds 0,x
pula
staa $30
nop
rti
OSStartHighRdy
CALL OSTaskSwHook ; Call user defined task switch hook
ldx OSTCBCur
lds 0,x
INC OSRunning
pula
staa $30
nop
rti |