Error on operand write with sinus function

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

Error on operand write with sinus function

1,231 次查看
teboulmickael
Contributor I

Hi,

 

I try to use sinus function on MCF5213 with Codewarrior. I am using the library C_4i_CF_MSL.a on my projet.

But when my software call the funtion sin this error occurs :

Error generate :

Access Error -- PC = 0X02DEEC

Error on operand write

 

Thanks !

标签 (1)
0 项奖励
回复
2 回复数

1,019 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

please check these points:

1. if math.h is included.

2. adjust ansi_prefix.CF.size.h as :

#define _MSL_FLOATING_POINT 1

//#define _MSL_NO_MATH_LIB 0

#undef _MSL_NO_MATH_LIB

#endif

#define _MSL_FLOATING_POINT_IO 1

3. add

#define __CF_USE_FULL_LIBS__ 1

to prefix text of Target setting -> C/C++Preprocessor

can this help you?


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,019 次查看
teboulmickael
Contributor I

Thank you very much, you save me :smileyhappy:

Now I have an other problem... M_PI is not recognized.

Do you know how can I use pi (3.14...) ?

0 项奖励
回复