- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello, I am a custermor who use your product CYCKIT-050 development KIT. I want to do some floating point computing on such chip. I could run your demo project like ADC_DAC, LCD, etc...
However when I implement a program used y=log(x), the compiler showed error and fail to compile. I have already include "math.h" in my project:
#include <device.h>
#include <math.h>
void main()
{ float y,x;
y=log(x);
}
It compiled wrong in the PSoC Creator 2.1 enviroment! but when I write y=log(10); the compiling seemed ok. Such problem really confused me, please help me out!!
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
Goto Project > Build Settings > Linker > General > Additional Libraries.
Now type m in the Additional Libraries field.
You could also refer to this KB article: http://www.cypress.com/?id=4&rID=42838
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@DPAK
Congratulations! Your first post and a quite correct, prompt and complete one!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This math library supports log10() function as well.
-
Kishore.