Where is MLIB_Conv_F32f

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Where is MLIB_Conv_F32f

跳至解决方案
1,803 次查看
aberger
Contributor V

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?

标记 (1)
1 解答
1,465 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

4 回复数
1,465 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andy,

I haven't find the function "MLIB_Conv_F32f "of in " MLIB User Guide for ARM Cortex M4",

only two convert functions:

pastedImage_1.png

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,465 次查看
aberger
Contributor V

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 

CM4FMLIB Table 2-8.png

Even though these function versions are listed in the table, they do not seem available when I include the MLIB library. 

0 项奖励
回复
1,466 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

1,465 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Andy,

I have checked  the RTCESL lib for CM4F, there only are two functions in the file  "MLIB_Conv_F32.h":

pastedImage_1.png

I will tell you after confirm whether it lost other functions .

Sorry for the inconvenient to you .

BR

Alice