Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > log function PSoC 5

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



log function PSoC 5
Moderator:
ANCY

Post Reply
Follow this topic



log function PSoC 5

runboom posted on 21 Dec 2011 4:24 AM PST
Member
3 Forum Posts

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




Re: log function PSoC 5

vvsk posted on 21 Dec 2011 05:45 AM PST
Cypress Employee
25 Forum Posts

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



Re: log function PSoC 5

runboom posted on 21 Dec 2011 06:20 AM PST
Member
3 Forum Posts

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



Re: log function PSoC 5

H L posted on 21 Dec 2011 02:03 PM PST
Top Contributor
679 Forum Posts

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






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20