FreeRtos, native Floats and Task switching

cdebrebisson wrote on Monday, April 24, 2017:

Hello,

I am working with an ARM Cortex A7 running FreeRTOS and I am having a problem.
I have 2 tasks, running in parallel, computing different parts of mandelbrot set.
It does not work -:frowning:
Note that running only one of the 2 tasks works perfectly!

However, if I change the code for my task so that it uses ints (with 12 bit fixed point arithmetics), then there is no issues and I can do both calculations in parallel…

It feels that FreeRTOS does not task switch the FPU registers. Is this assumption correct?
If yes, what other registers are not switched (NEON, …)

Regards,
Cyrille

rtel wrote on Monday, April 24, 2017:

See the section “using the floating point unit” on the following page:
http://www.freertos.org/Using-FreeRTOS-on-Cortex-A-Embedded-Processors.html

Exactly what you need to do depends on the compiler you are using and
the version of FreeRTOS you are using.

glenenglish wrote on Monday, April 24, 2017:

I can’t find
configUSE_TASK_FPU_SUPPORT
anywhere in any source files… using 9.0…
?

rtel wrote on Monday, April 24, 2017:

There are a few different Cortex-A ports, some with GIC support some
with proprietary interrupt controller support, and for different
compilers. configUSE_TASK_FPU_SUPPORT is in this version:
\FreeRTOS\Source\portable\GCC\ARM_CA9

glenenglish wrote on Tuesday, April 25, 2017:

ta. that’s why I am not seeing it, it’s in one of the ports. very good. thanks.

cdebrebisson wrote on Tuesday, April 25, 2017:

Hello,

Thanks for your help, I did discover the configUSE_TASK_FPU_SUPPORT define and the vPortTaskUsesFPU(); function call.

It does work now!

Thanks!

Cyrille