Problem when create RTOS Kernel
Hello guys,
I am trying to understand RTOS Kernel and create a simple one ,for that I am using core registers and I have a problem in asm codes.I am following UDEMY course so teacher is using Cortex M4 but because of free I am using Cortex M0 probably that is the problem but registers are same why I have errors.So codes are below.MCU is STM32F030F4 and teacher's MCU is STM32F4 Discovery Board
AREA |.text|, CODE, READONLY, ALIGN=2
THUMB
EXTERN currentPt
EXPORT SysTick_Handler
EXPORT osSchedulerLaunch
SysTick_Handler ;save r0,r1,r2,r3,r12,lr,pc,psr
CPSID I
PUSH {R4-R11} ;save r4,r5,r6,r7,r8,r9,r10,r11
LDR R0, =currentPt ; r0 points to currentPt
LDR R1, [R0] ; r1= currentPt
STR SP, [R1]
LDR R1, [R1,#4] ; r1 =currentPt->next
STR R1, [R0] ;currentPt =r1
LDR SP, [R1] ;SP= currentPt->stackPt
POP {R4-R11}
CPSIE I
BX LR
osSchedulerLaunch
LDR R0, =currentPt
LDR R2, [R0] ; R2 =currentPt
LDR SP, [R2] ;SP = currentPt->stackPt
POP {R4-R11}
POP {R0-R3}
POP {R12}
ADD SP,SP,#4
POP {LR}
ADD SP,SP,#4
CPSIE I
BX LR
ALIGN
END
I have got these errors
osKernel.s(10): error: A1874E: Specified register list cannot be loaded or stored in target instruction set
osKernel.s(13): error: A1875E: Register Rt must be from R0 to R7 in this instruction
osKernel.s(16): error: A1875E: Register Rt must be from R0 to R7 in this instruction
osKernel.s(17): error: A1874E: Specified register list cannot be loaded or stored in target instruction set
osKernel.s(26): error: A1875E: Register Rt must be from R0 to R7 in this instruction
osKernel.s(27): error: A1874E: Specified register list cannot be loaded or stored in target instruction set
osKernel.s(29): error: A1875E: Register Rn must be from R0 to R7 in this instruction
osKernel.s(31): error: A1875E: Register Rn must be from R0 to R7 in this instruction
".\Objects\my_rtos.axf" - 8 Error(s), 0 Warning(s).
