FPU Type options for MCUXpresso for double-precision floating point

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FPU Type options for MCUXpresso for double-precision floating point

1,894 Views
Hat
Contributor II

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.

Hat_0-1613406140375.png

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.

Hat_1-1613406341316.png

Thanks

0 Kudos
Reply
4 Replies

1,865 Views
nickwallis
Senior Contributor I

Perhaps also check the actual compiler command line being used, I think you need both -mfpu=fpv5-d16 and -mfloat-abi=hard.

-Nick

0 Kudos
Reply

1,885 Views
mjbcswitzerland
Specialist V

Hi

mjbcswitzerland_0-1613411904999.png

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

0 Kudos
Reply

594 Views
223specialist
Contributor I

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

 

@mjbcswitzerland 

0 Kudos
Reply

585 Views
mjbcswitzerland
Specialist V

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

0 Kudos
Reply