- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I'm using modus toolbox to make an application with the evaluation kit CYW920819-EVB-02.
In the application I need to use the log() function included in the math.h library.
even if I include the math.h library when the program compiles gives this error:
How do I fix this mistake?
thank you so much
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AlPr_4646536 ,
Math functions are not supported in MTB for 20xx devices. Only for PSoC its available.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to reproduce your problem with ModusToolbox 2.1 without specifying -lm but to my surprise it compiled...
But anyway, how about adding "-lm" in the makefile
line of "LDFLAGS=" something like below?
===============
# Additional / custom linker flags.
LDFLAGS=-lm
===============
moto
P.S. FYI, I used CY8CKIT-062-BLE and HelloWorld to test and added "log()" function.
P.S.2
It was my bad, we should use LDFLAGS=-lm instead of LDLIBS=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Motoo
I also tried to compile in the hello wordl application in the evaluation board CY8CKIT-062-BLE.
It worked without problems, but with the evaluation version I use it doesn't work.
I think the problem may be here because the evaluation board I am using does not use PSOC 6.
Thank you so much
Kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AlPr_4646536 ,
Math functions are not supported in MTB for 20xx devices. Only for PSoC its available.
Regards,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you so much