OSPendSV: MRS R0, psp //PSP is process stack pointer CBZ R0, OSPendSV_nosave //skip register save the firsttime SUB R0, R0, #0x20 stm r0, { r4 - r11 } // 出错了 。 。 。 。 OSPendSV_nosave: PUSH {R14} //; need to save LR exc_return value LDR R0, __OS_TaskSwHook //; OSTaskSwHook(); BLX R0 pop {r14} // 出错了 LDR R4, __OS_PrioCur //; OSPrioCur = OSPrioHighRdy LDR R5, __OS_PrioHighRdy LDRB R6, [R5] STRB R6, [R4]
LDR R4, __OS_TCBCur //; OSTCBCur = OSTCBHighRdy; LDR R6, __OS_TCBHighRdy LDR R6, [R6] STR R6, [R4]
LDR R0, [R6] LDM R0, {R4-R11} // 出错了 ADD R0, R0, #0x20 MSR psp, R0 //; load PSP with new process SP ORR LR, LR, #0x04 // 出错了 BX LR NOP
以上代码在iar上编译通过但在Crossstudio for arm上出错了:错误如下:
Building “ucTest” in configuration “THUMB Flash Debug” — 4 errors Assembling os_cpu_a.asm — 4 errors D:/soft/lm3s/ucProg/uCOS-II/Ports/arm-cortex-m3/Generic/IAR/os_cpu_a.asm: Assembler messages: Error: lo register required -- `stm r0,{r4-r11}' Error: invalid register list to push/pop instruction --`pop {r14}' Error: lo register required -- `ldm R0,{R4-R11}' Error: unshifted register required -- `orr LR,LR,#0x04' Build failed
有没有crossstudio for arm 关于汇编的文档啊,或者gcc关于汇编的也行, 还有gcc的主页是什么啊? |