- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am programming a CY8C5488AXI psoc. The program built successfully in the past. Now (after a few months), when I build it, I get the following error ( using PSoC Creator v4.4. with toolchain ARM GCC 5.4-2016-q2-update):
C:\ELENTECH Projects\Distiller Control\PSoC\Distiller_Control\Distiller_Control_Proto.cydsn/proj_support.c:2176: undefined reference to `roundf'
collect2.exe: error: ld returned 1 exit status
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
--------------- Build Failed: 12/22/2021 10:17:52 ---------------
This error refers to the following statement that calls roundf() (supposedly in math library):
temp = roundf(DAC_ONEDEGREE_COUNT * ((float) degrees));
The program has the #include <math.h> statement, which should declare the roundf() function.
Any suggestions/comments?
Thanks!
Solved! Go to Solution.
- Labels:
-
PSoC Creator & Designer Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @guag_1662311,
Could you please try the below:
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.
Please let us know if this solves your problem.
Thanks,
Krupashankar