Rtos code cntains bug possible incompatability with I2C
Fork of mbed-rtos by
Diff: rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s
- Revision:
- 74:899aee34da6a
- Parent:
- 68:d3d0e710b443
--- a/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s Thu Apr 16 11:45:43 2015 +0100 +++ b/rtx/TARGET_CORTEX_M/TARGET_M4/TOOLCHAIN_GCC/HAL_CM4.s Thu Apr 23 08:30:38 2015 +0100 @@ -210,8 +210,12 @@ CBZ R1,SVC_Next /* Runtask deleted? */ TST LR,#0x10 /* is it extended frame? */ + #ifdef __FPU_PRESENT ITTE EQ VSTMDBEQ R12!,{S16-S31} /* yes, stack also VFP hi-regs */ + #else + ITE EQ + #endif MOVEQ R0,#0x01 /* os_tsk->stack_frame val */ MOVNE R0,#0x00 STRB R0,[R1,#TCB_STACKF] /* os_tsk.run->stack_frame = val */ @@ -229,8 +233,12 @@ LDMIA R12!,{R4-R11} /* Restore New Context */ LDRB R0,[R2,#TCB_STACKF] /* Stack Frame */ CMP R0,#0 /* Basic/Extended Stack Frame */ + #ifdef __FPU_PRESENT ITTE NE VLDMIANE R12!,{S16-S31} /* restore VFP hi-registers */ + #else + ITE NE + #endif MVNNE LR,#~0xFFFFFFED /* set EXC_RETURN value */ MVNEQ LR,#~0xFFFFFFFD MSR PSP,R12 /* Write PSP */ @@ -303,8 +311,12 @@ MRS R12,PSP /* Read PSP */ TST LR,#0x10 /* is it extended frame? */ + #ifdef __FPU_PRESENT ITTE EQ VSTMDBEQ R12!,{S16-S31} /* yes, stack also VFP hi-regs */ + #else + ITE EQ + #endif MOVEQ R0,#0x01 /* os_tsk->stack_frame val */ MOVNE R0,#0x00 STRB R0,[R1,#TCB_STACKF] /* os_tsk.run->stack_frame = val */ @@ -321,8 +333,12 @@ LDMIA R12!,{R4-R11} /* Restore New Context */ LDRB R0,[R2,#TCB_STACKF] /* Stack Frame */ CMP R0,#0 /* Basic/Extended Stack Frame */ + #ifdef __FPU_PRESENT ITTE NE VLDMIANE R12!,{S16-S31} /* restore VFP hi-registers */ + #else + ITE NE + #endif MVNNE LR,#~0xFFFFFFED /* set EXC_RETURN value */ MVNEQ LR,#~0xFFFFFFFD MSR PSP,R12 /* Write PSP */