Link Error   : Undefined : "asin"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Link Error   : Undefined : "asin"

Jump to solution
834 Views
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.

Labels (1)
0 Kudos
1 Solution
693 Views
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!

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

View solution in original post

0 Kudos
5 Replies
693 Views
teboulmickael
Contributor I

Thanks.

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

Error generate :

Access Error -- PC = 0X02DEEC

Error on operand write

0 Kudos
694 Views
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 Kudos
693 Views
teboulmickael
Contributor I

Thanks.

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

Error generate :

Access Error -- PC = 0X02DEEC

Error on operand write

0 Kudos
693 Views
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 Kudos
693 Views
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 Kudos