Skip to content

Commit 4ac44e2

Browse files
committed
Address review comments from @ChristosZosi
1 parent 9e4eb73 commit 4ac44e2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

portable/GCC/ARM_CR5/port.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@
7474
#error configMAX_API_CALL_INTERRUPT_PRIORITY must be greater than ( configUNIQUE_INTERRUPT_PRIORITIES / 2 )
7575
#endif
7676

77+
/*
78+
* __ARM_FP is defined by the c preprocessor when FPU support is enabled,
79+
* ususally with the -mfpu= argument and mfloat-abi=.
80+
*
81+
* Note: Some implementations of the c standard library may use FPU registers
82+
* for generic memory operations (memcpy, etc).
83+
* When setting configUSE_TASK_FPU_SUPPORT == 1, care must be taken to
84+
* ensure that the FPU registers are not used without an FPU context.
85+
*/
7786
#if configUSE_TASK_FPU_SUPPORT == 0
7887
#ifdef __ARM_FP
7988
#error __ARM_FP is defined, so configUSE_TASK_FPU_SUPPORT must be set to either to 1 or 2.

portable/GCC/ARM_CR5/portmacro.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,16 @@ void FreeRTOS_Tick_Handler( void );
132132
*/
133133
#if ( configUSE_TASK_FPU_SUPPORT == 1 )
134134
void vPortTaskUsesFPU( void );
135+
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesFPU()
135136
#elif ( configUSE_TASK_FPU_SUPPORT == 2 )
136137

137138
/*
138139
* Each task has an FPU context already, so define this function away to
139140
* prevent it being called accidentally.
140141
*/
141142
#define vPortTaskUsesFPU()
143+
#define portTASK_USES_FLOATING_POINT()
142144
#endif /* configUSE_TASK_FPU_SUPPORT */
143-
#define portTASK_USES_FLOATING_POINT() vPortTaskUsesFPU()
144145

145146
#define portLOWEST_INTERRUPT_PRIORITY ( ( ( uint32_t ) configUNIQUE_INTERRUPT_PRIORITIES ) - 1UL )
146147
#define portLOWEST_USABLE_INTERRUPT_PRIORITY ( portLOWEST_INTERRUPT_PRIORITY - 1UL )

0 commit comments

Comments
 (0)