本人打算将原先ADS下的代码文件转到MDK下使用 但是原先ADS下的汇编程序编译时出现如下错误: study_msl.axf: Error: L6238E: os_cpu_a.o(subr) contains invalid call from '~PRES8' function to 'REQ8' function OSIntEnter. ... os_cpu_a.s中有关汇编引用C程序的代码如下: IMPORT OSIntEnter IMPORT OSIntExit IMPORT OSTimeTick IMPORT EInt4567Isr ... K_LINK_SAVE DCD 0 ;定义变量K_LINK_SAVE,初值为0; K_PSR_SAVE DCD 0
EXPORT OSEINT4567ISR OSEINT4567ISR STMFD sp!, {r4} LDR r4, =K_LINK_SAVE STR lr, [r4] MRS lr, spsr STR lr, [r4, #4] LDMFD sp!, {r4} ORR lr, lr, #0x80 MSR cpsr_cxsf, lr
SUB sp, sp, #4 STMFD sp!, {r0-r12, lr} LDR r4, =K_LINK_SAVE LDR lr, [r4, #0] SUB lr, lr, #4 ; lr = LINK_SAVE - 4, STR lr, [sp, #(14*4)] LDR r4, [r4, #4] STMFD sp!, {r4} LDR r4, addr_OSTCBCur LDR r4, [r4] STR sp, [r4]
BL OSIntEnter BL EInt4567Isr BL OSIntExit
LDMFD sp!, {r4} MSR cpsr_cxsf, r4 LDMFD sp!, {r0-r12,lr,pc}
哪位高手帮忙指点一下,谢谢 |