Link Error   : Undefined : "asin"

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

Link Error   : Undefined : "asin"

跳至解决方案
860 次查看
teboulmickael
Contributor I

I try to use asin() function on my project (M5213EVB) but I found link error.

I add on the file #include <math.h> but it doesn't work.

标签 (1)
0 项奖励
1 解答
719 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Mickael,

When you create a new project in CodeWarrior for ColdFire 7.1 a library with a smaller footprint is added, because of this some routines and some features are not added, if you want to use the asin() function you need to add the full size library:

- Remove the “C_4i_CF_SZ_MSL.a” library from the Libs folder in your project.

- Make a right click on the Libs folder, click on “add files” and browse to “Program Files\Freescale\CodeWarrior for ColdFireV7.1\ColdFire_Support\msl\MSL_C\MSL_ColdFire\Lib” and add the “C_4i_CF_MSL.a” library.

- Compile the project and the error should not appear.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
5 回复数
719 次查看
teboulmickael
Contributor I

Thanks.

Compilation works now but the function doesn't work...

Error generate :

Access Error -- PC = 0X02DEEC

Error on operand write

0 项奖励
720 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Mickael,

When you create a new project in CodeWarrior for ColdFire 7.1 a library with a smaller footprint is added, because of this some routines and some features are not added, if you want to use the asin() function you need to add the full size library:

- Remove the “C_4i_CF_SZ_MSL.a” library from the Libs folder in your project.

- Make a right click on the Libs folder, click on “add files” and browse to “Program Files\Freescale\CodeWarrior for ColdFireV7.1\ColdFire_Support\msl\MSL_C\MSL_ColdFire\Lib” and add the “C_4i_CF_MSL.a” library.

- Compile the project and the error should not appear.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
719 次查看
teboulmickael
Contributor I

Thanks.

Compilation works now but the function doesn't work...

Error generate :

Access Error -- PC = 0X02DEEC

Error on operand write

0 项奖励
719 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Mickael,

The V2 ColdFire processor uses an imprecise reporting mechanism for access errors on operand writes, a write cycle may be decoupled from the execution of the instruction causing the write. Thus, if an access error occurs on an operand write, the signaling of the error is imprecise. Accordingly, the PC contained in the exception stack frame represents the location in the program when the access error is signaled, not necessarily the instruction causing the fault. All programming model updates associated with the write instruction are complete.

You can try using the NOP instruction to find the part of code causing the error. This instruction delays its  execution until all previous operations, including all pending write operations, are complete. If any previous write terminates with an access error, it is guaranteed to be reported on the NOP instruction.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 项奖励
719 次查看
teboulmickael
Contributor I

Hi Carlos,

I executed my software in debug, step by step, and the error occure just when I passe on this function:

test1 = sin(0.5);

I don't understand what do you mean with the "NOP" ?

0 项奖励