Hi,
I want to use Math function with SPFP.
Ex> cos, sin, pow ..
There are my test report using SPFP ans SW mode.
I think math library doesn't use SPFP.
How can I use math function with SPFP(HW FPU)?
Hello,
I am not sure, which IDE you use, if CodeWarrior or S32 Design Studio and which library you use (EWL or Newlib), but I checked EWL in S32 Design Studio and this library is not compiled to use hardware floating point.
If you want to use math function with SPFP supported, you must recompile the library.
In S32 Design Studio installation folder and also in CodeWarrior installation folder, there are complete source file for EWL including also makefiles. So, you only need to set compiler options for Hardware floating point (for GCC it is -mhard) and recompile with this option.
Regards,
Martin
Hello,
Thank you for your useful answers.
But I couldn't compile that.
Under picture is our makefile and error message.
Could you build and give it to me?
I need a C library.
This is our environments.
- CPU : MPC5674F (e200z3 core)
- FPU : SPFP
- IDE : CW10.7 - eclipse
Regards,
Henk
Hello,
I am sorry for my previous answer. It is not necessary to recompile the library, because this had been already done and library which supports SPFP mathematical function is already included in CodeWarrior IDE.
In your project, open project properties and set libraries the same way as in the figure below:
Also, you must switch the project Floating point to SPFP_only.
Clean your project and recompile again.
Now functions from math.h supports hardware floating point instructions.
Regards,
Martin
Hi,
Thank you for your answer.
I'll check again soon.
regards,
Henk