I am trying to use the Math Library (MLIB) for Cortex M4F, specifically the MLIB_Conv_F32f function, which accepts a float_t and returns a frac32_t in the range <-1; 1). This functionality is described in the MLIB User Guide. However, the function seems to be missing from the actual library, as when I #include "mlib.h", I end up with the compilation error "undefined reference to 'MLIB_Conv_F32f'. Furthermore, digging around in "mlib.h" and "MLIB_Conv_F32.h" reveals no references or definitions for this function. What am I missing?
已解决! 转到解答。
Hello Andy,
Sorry to reply you late.
The float conv function is in the MLIB_Conv_FLT_Asmi.h file. So, if you want to use the functions with floating-point types you must include the mlib_FP.h file. The mlib.h only includes the frac/integer functions.
Hope it helps.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Andy,
I haven't find the function "MLIB_Conv_F32f "of in " MLIB User Guide for ARM Cortex M4",
only two convert functions:
you can find the guide :
https://www.nxp.com/docs/en/user-guide/CM4MLIBUG.pdf?fsrch=1&sr=3&pageNum=1
It also describe how to use it on MCUXpresso IDE, KDS, IAR or KEIL.
Hope it helps,
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I am speaking in reference to the CM4F library (for processors with an FPU) from "MLIB User's Guide: ARM® Cortex® M4F".
https://www.nxp.com/docs/en/user-guide/CM4FMLIBUG.pdf?fsrch=1&sr=3&pageNum=1
Even though these function versions are listed in the table, they do not seem available when I include the MLIB library.
Hello Andy,
Sorry to reply you late.
The float conv function is in the MLIB_Conv_FLT_Asmi.h file. So, if you want to use the functions with floating-point types you must include the mlib_FP.h file. The mlib.h only includes the frac/integer functions.
Hope it helps.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Andy,
I have checked the RTCESL lib for CM4F, there only are two functions in the file "MLIB_Conv_F32.h":
I will tell you after confirm whether it lost other functions .
Sorry for the inconvenient to you .
BR
Alice