File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
portable/GCC/ARM_CRx_No_GIC Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -312,13 +312,14 @@ void FreeRTOS_Tick_Handler( void )
312
312
313
313
void vPortTaskUsesFPU ( void )
314
314
{
315
- uint32_t ulInitialFPSCR = 0 ;
315
+ // uint32_t ulInitialFPSCR = 0;
316
316
317
317
/* A task is registering the fact that it needs an FPU context. Set the
318
318
* FPU flag (which is saved as part of the task context). */
319
319
ulPortTaskHasFPUContext = pdTRUE ;
320
320
321
321
/* Initialise the floating point status register. */
322
- __asm volatile ( "FMXR FPSCR, %0" ::"r" ( ulInitialFPSCR ) : "memory" );
322
+ vSetupFPU ();
323
+ /*__asm volatile ( "FMXR FPSCR, %0" ::"r" ( ulInitialFPSCR ) : "memory" );*/
323
324
}
324
- /*-----------------------------------------------------------*/
325
+ /*-----------------------------------------------------------*/
Original file line number Diff line number Diff line change @@ -149,6 +149,15 @@ vPortRestoreTaskContext:
149
149
/ * Switch to system mode. * /
150
150
CPS #SYS_MODE
151
151
portRESTORE_CONTEXT
152
+
153
+ . align 4
154
+ .type vSetupFPU , %function
155
+ vSetupFPU:
156
+ PUSH { R0 }
157
+ MOV R0 , # 0x0
158
+ FMXR FPSCR , R0
159
+ POP { R0 }
160
+ BX LR
152
161
153
162
. align 4
154
163
.type FreeRTOS_IRQ_Handler , %function
You can’t perform that action at this time.
0 commit comments