Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : enable FPU in UCOS #44

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
8 changes: 5 additions & 3 deletions Ports/ARM-Cortex-M/ARMv7-M/os_cpu_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void OSIdleTaskHook (void)
void OSInitHook (void)
{
#if (OS_CPU_ARM_FP_EN > 0u)
CPU_INT32U reg_val;
volatile CPU_INT32U reg_val;
#endif
/* 8-byte align the ISR stack. */
OS_CPU_ExceptStkBase = (CPU_STK *)(OSCfg_ISRStkBasePtr + OSCfg_ISRStkSize);
Expand Down Expand Up @@ -513,8 +513,10 @@ void OSTaskSwHook (void)
#if OS_CFG_TASK_PROFILE_EN > 0u
ts = OS_TS_GET();
if (OSTCBCurPtr != OSTCBHighRdyPtr) {
OSTCBCurPtr->CyclesDelta = ts - OSTCBCurPtr->CyclesStart;
OSTCBCurPtr->CyclesTotal += (OS_CYCLES)OSTCBCurPtr->CyclesDelta;
if (ts > OSTCBCurPtr->CyclesStart) {
OSTCBCurPtr->CyclesDelta = ts - OSTCBCurPtr->CyclesStart;
OSTCBCurPtr->CyclesTotal += (OS_CYCLES)OSTCBCurPtr->CyclesDelta;
}
}

OSTCBHighRdyPtr->CyclesStart = ts;
Expand Down
Loading