- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using PSoC Creator 3.3 CP2 (3.3.0.7343) on Win 7. My chip is a CY8C4125PVI-482 and I want to use the Thermistor calculator.
Building fails with the following messages:
M0120 Build error: undefined reference to `log'
M0120 Build error: undefined reference to `pow'
M0120 Build error: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
I have created a new project with only the thermistor with no optimisations. The code is:
#include <project.h> int main() { uint32 resistance = 5000; CyGlobalIntEnable; /* Enable global interrupts. */ for(;;) { My_Nice_Thermistor_GetTemperature(resistance); resistance++; if(resistance > 300000) resistance = 5000; } }
I've tried 'include'ing <math.h> but that isn't it. I guess there's a library missing; but what one?!
If I download the sample for CY8C3866AXI-040 (CE95381) it builds fine. But that's 8051 not ARM so doesn't help me much.
All help received with pathetic gratitude by PSoC newcomer.
- Richard.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Richard!
In Creator go to Project -> Build Settings -> Linker -> General
Add "m" (without the quotes) into Additional Libraries. This will add the math library "Libm.a" to your project.
Happy coding
Bob