cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 FPU hard enabled, still seeing float functions in assembly

Gossamer
Associate II
 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard 

I am building my project with above options and enabling the FPU unit

void System::enableFPU()
{
    SETVALUE(FPUB->CPACR , ((3UL << 10*2) | /* set CP10 Full Access */ 
                                   (3UL << 11*2) )); /* set CP11 Full Access */ 
}

What is interesting is that in the dump output I can still see

1> 134218232 00000352 T __aeabi_fadd
1> 134218228 00000356 T __aeabi_fsub

I was expecting that instead of fadd,fsub library FPU instructions would be used.

Is this normal behaviour or am I missing something in the configuration?

when float-abi=soft is set I get some more functions. So it seems that fmul and fdiv are supported by float-abi but fadd and fsub are not ?

1> 134219120 00000310 T __aeabi_fdiv
1> 134219120 00000310 T __divsf3
1> 134218232 00000352 T __aeabi_fadd
1> 134218228 00000356 T __aeabi_fsub
1> 134218228 00000356 T __subsf3
1> 134218760 00000360 T __aeabi_fmul

1 REPLY 1
TDK
Guru

Are you including libraries? What functions/files are the __aeabi_fadd calls found within?

If you feel a post has answered your question, please click "Accept as Solution".