STMCubeIDE: compiler doesn't create code for FPU on STM32G431
I am using STM32CubeIDE version 1.14.1 on a WIN10 machine.
The following C code
asm("VMUL.F32 s0, s0, s0");
volatile float xyz = 3.1415;
xyz = xyz * 2.3;
disassembles to the following:
79 asm("VMUL.F32 s0, s0, s0");
08000df0: vmul.f32 s0, s0, s0
80 volatile float xyz = 3.1415;
08000df4: ldr r3, [pc, #344] ; (0x8000f50 <main+360>)
08000df6: str r3, [sp, #0]
81 xyz = xyz * 2.3;
08000df8: ldr r0, [sp, #0]
08000dfa: bl 0x8000598 <__extendsfdf2>
08000dfe: add r3, pc, #328 ; (adr r3, 0x8000f48 <main+352>)
08000e00: ldrd r2, r3, [r3]
08000e04: bl 0x8000648 <__muldf3>
08000e08: bl 0x8000bf8 <__truncdfsf2>
The compiler flags are set:
and I see them also used when compiling.
The compiler used is GNU11 (ISO C11 + gnu extensions)(-std=gnu11)
When walking through the code, the debugger stops at the breakpoint for SCB->CPACK:
void SystemInit(void)
{
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */
#endif
Clearly something's wrong but I am out of ideas where to search. Can someone give me a hint what's going on?
