log function PSoC 5

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,
I wanted to put the application in AN60590 PSoC 5, the ARM compiler does not recognize the function log
multiply_factor = (Q_BY_K AdcResolution *) / (IDEALITY_FACTOR * (log (CurrentRatio)));
while log (20) or log (20.12) works
This does not in PSoC Creator 1 and 2
If you have the solution!
thank you

0 Likes
3 Replies
VivekK_11
Employee
Employee
Welcome! First solution authored 10 replies posted

This KB article address your issue http://www.cypress.com/?id=4&rID=42838. I have also talked about this KB  in the AN60590 application note (http://www.cypress.com/?rID=42993) in page 5 of the pdf just before the section "Transistor Selection".

   

Regards,

   

Vivek

0 Likes
Anonymous
Not applicable

thank you
I'm sorry, I saw KB article but I did not understand. Now it works but I do not understand why "m" but it does not matter.
Happy Holidays

0 Likes
Anonymous
Not applicable

In order to use the external library one have to link the library using  /usr/lib/libm.a in the command line

   

The short form is

   

-lm

   

the compiler option -lXYZ will attempt to link object files with a library file ‘libXYZ.a’ in the standard library directories

0 Likes