- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All, I don't know if where this question should be asked here or PSoC Creator....but...
has anybody had problems with the sqrt() function? Here is a small test code to even see if it will compile and I get a "...undefined reference to `sqrt'..." error. The example is close to the Keil help context example.
Any sugestions?
Keith
/* ========================================
*
*
* ========================================
*/
#include <device.h>
#include <math.h>
float temp;
float Vmag;
void main()
{
temp = 234.5;
Vmag = sqrt(temp);
for(;;)
{
}
}
/* [] END OF FILE */
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Keith,
Just now I realised that you are facing this issue with PSoC5 GCC Compiler and not with PSoC3 Keil Compiler. I have created a seperate project to test this and then I found out that it is because of math library not being included in GCC compiler.
Please refer to the KB article written by me for more details - http://www.cypress.com/?rID=42838
Regards,
Kishore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That was it, man.... what a relief. Why aren't things like this better documented?
Thanks again,
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I scoured the web for this. Now the log() function works just fine. Thanks for the pointer.
gwdevprojects.blogspot.com