How do I choose a double precision hardware FPU in the MCUXpresso project settings?
The FPU type selectors are confusing and does not seem to match with ARM documentation.
I need hardware double-precision floating point.
On Arm's documentation, the option for double precision is given as FPv5-DP-D16-M, and the MCUXpresso does not let me choose that.
Thanks
Perhaps also check the actual compiler command line being used, I think you need both -mfpu=fpv5-d16 and -mfloat-abi=hard.
-Nick
Hi
is correct for i.MX RT parts with double-precision FPU.
For those with only single-precision (i.MX RT 1011) the FPv5-SP16(Hard ABI) can be used instead.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements
For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1064.html
I know this is an older post but I found this looking for a similar problem, can a single precision FPU do any double precision math at a reduced rate? Or I need to get a double precision FPU to utilize FPU hardware for doubles
Hi
It will depend on the compiler: possibly it will make use of single-precision FPU HW to help accelerate the calculations needed to achieve double precision accuracy but it may also be that this is not possible or the compiler developers didn't do it that way and used pure SW algorithms.
There is a discussion here but I don't know whether it is all correct or not: https://stackoverflow.com/questions/24701953/doing-double-precision-calculation-on-single-precision-...
To be sure it is best to test it with the compiler and its settings and compare it against a double-precision HW implementation to get an idea of the performance and compare it to what can be accepted in an application case.
Regards
Mark