Hi, where can i find source files of SFPE libraries? Thanks.
where can i find source files of SFPE libraries?
I guess you are looking math SPFP library source codes.
Could you be little more specific about the source files you are missing?
Which CodeWarrior do you use? CW for MPC55xx/56xx v2.x?
Thanks for your reply.
Your guess is right.
We use two versions of CW.
- CW MCU V10. 7
- CW for MPC55XX and MPC56XX 2.10
We are using a MPC5674F.
There is a complete .mcp project of FP library in CodeWarrior Classic:
<CW for MPC55xx and MPC56xx 2.10>\PowerPC_EABI_Support\MSL\MSL_C\PPC_EABI\Project\fdlibm.*.mcp
sources are available here:
<CW for MPC55xx and MPC56xx 2.10>\PowerPC_EABI_Support\MSL\MSL_C\PPC_EABI\SRC\
In CodeWarrior Eclipse (V10.7) SP floating point routines are located here:
<CW MCU v10.7>\MCU\PA_Support\ewl\EWL_C\src\sun_math\Single_precision\
Hope it helps.
I made a test function like this.
z = x* y;
a = (int) z;
If I build upper codes with below libraries in Eclipse Codewarrior, there is no error.
- libc_E200z760_VLE. a
- librt_E200z760_VLE. a
But, if I build the codes without libraries, there are some errors like following.
- undefined : '_f_ftoi' Referenced 'from floatTestFunc' in......
- undefined : '_f_mul' Referenced 'from floatTestFunc' in......
But, I can't find related source files in upper folder.
I would like to build with source files regarding floating points.
The functions you are referring to are software emulated versions of float multiplication/conversion float to int.
These functions are being used by the compiler in case floating point flag is set to software (-fp soft).
Unfortunately there is no source code available for these functions, they are available only in object form
<CW MCU v10.x>\MCU\PA_Support\ewl\EWL_Runtime\Runtime_PA\Source\sfpe.*.a"
Please make sure your compiler has -fp SPFP or -fp SPFP_Only flag since it seems you are using a MCU with SPFP unit (e200z7) so you don't have to emulate single precision floating point operations using a library routines.
To clarify my understanding is correct, if I change the floating point option to SFPE, the errors will be cleared. Is it correct?
Actually, I don't know the difference between Software and SFPE.
Your response helped me a lot.
Yes your assumption is correct - errors should disappear if you switch to SPFP or SPFP_Only.
* SPFP (Single Precision Floating Point) is in fact kind of Hardware floating point support. This option causes that single precision - 32 bit float number calculations are compiled into a single hardware instruction (or sequence of these instructions)
For more details please see EFPU2 unit - http://www.nxp.com/assets/documents/data/en/reference-manuals/e200z760RM.pdf
Double precision (64-bit ) operations are emulated by SW since there is no hw support for this on chip.
*Software - this option must be used on the devices without any floating point unit and both single/float and double precision calculation are emulated using software routines with sequence of an integer instructions. These routines significantly decreases CPU speed performance since instead of a single instruction there is a complex routine.
Retrieving data ...