Skip to content

Commit 886d1fd

Browse files
committed
Add vPortInitialiseFPSCR API
1 parent d37b605 commit 886d1fd

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

portable/GCC/ARM_CRx_No_GIC/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void vPortTaskUsesFPU( void )
319319
ulPortTaskHasFPUContext = pdTRUE;
320320

321321
/* Initialise the floating point status register. */
322-
vSetupFPU();
322+
vPortInitialiseFPSCR();
323323
/*__asm volatile ( "FMXR FPSCR, %0" ::"r" ( ulInitialFPSCR ) : "memory" );*/
324324
}
325325
/*-----------------------------------------------------------*/

portable/GCC/ARM_CRx_No_GIC/portASM.S

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
.global FreeRTOS_IRQ_Handler
4848
.global FreeRTOS_SVC_Handler
4949
.global vPortRestoreTaskContext
50+
.global vPortInitialiseFPSCR
5051

5152

5253
.macro portSAVE_CONTEXT
@@ -149,15 +150,17 @@ vPortRestoreTaskContext:
149150
/* Switch to system mode. */
150151
CPS #SYS_MODE
151152
portRESTORE_CONTEXT
152-
153+
154+
155+
/******************************************************************************
156+
* vPortInitialiseFPSCR is used to initialize the FPSCR context.
157+
*****************************************************************************/
153158
.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
159+
.type vPortInitialiseFPSCR, %function
160+
vPortInitialiseFPSCR:
161+
MOV R0, #0
162+
FMXR FPSCR, R0
163+
BX LR
161164

162165
.align 4
163166
.type FreeRTOS_IRQ_Handler, %function

0 commit comments

Comments
 (0)