Hi all,
I have some classes that I recently converted to floating point.
These classes have an initizalizer constructor, that fill some floating point members with constants.
Constants are declared integer, and I cannot change that, so the constructor may use the FPU to convert from integer to float as part of the initialization.
Unfortunately if the class is declared in global scope, the initializer is called "before" main.
What I see is that if I start from the debugger everything is ok, while if I cycle the power without the debugger the processor is stuck in fault.
I tried to follow the debugger debugger after a core reset following the C startup and I saw that at the first FPU instruction the processor jumps to Fault.
My guess, is that the C startup does not initialize the FPU.
Is there any compiler or linker option to enable FPU during startup execution?
While on the subject what --float-support option is to be used and where I can find documentation about the differences?
I am using FPv4SPD16 and support library <automatic>. Any better choice?
Regards.
Mau.