Using Math Functions in PSoC® Creator™ for the PSoC 4 or PSoC 5LP GCC Compiler
Employee
Mar 24, 2011
05:25 AM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Mar 24, 2011
05:25 AM
How to use math functions in PSoC® Creator™ 3.0 for the PSoC 4 or PSoC 5LP GCC Compiler?
- To use math functions (for example, sqrt or pow) with PSoC Creator, do the following steps:
-
Click Project.
-
Click Build Settings.
-
Open the Linker settings under ARM GCC 4.7.3 and click General.
-
Under Additional Libraries, add m.
These steps are shown in Figure 1.
Figure 1. Adding the Math Library
If you do not add this additional library then you will get the build error, "undefined reference to sqrt" (where sqrt is a math function) if you try to use a math function.
Version: **
Translation - Japanese: PSoC 4またはPSoC 5LP GCCコンパイラーにSoC® Creator™の数学関数の使用 – KBA93076 - Community Translated (JA)
Translation - Chinese: 如何在PSoC® Creator™中为PSoC 4或PSoC 5LP GCC编译器使用数学函数 - Community Translated (ZH)
- Tags:
- 32-bit arma cortexa-m0 psoca 4
- GCC Compiler
- psoc 4
- psoc 5lp
- psoca 5
- psoca creatora
- PSoC® Creator™ 3.0
Rate this article: