cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth SDK

AlPr_4646536
New Contributor II

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:

pastedImage_0.png

How do I fix this mistake?

thank you so much

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator

Hi AlPr_4646536 ,

Math functions are not supported in MTB for 20xx devices. Only for PSoC its available.

Regards,
Anjana

View solution in original post

4 Replies
MotooTanaka
Esteemed Contributor

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=

AlPr_4646536
New Contributor II

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

AnjanaM_61
Moderator
Moderator

Hi AlPr_4646536 ,

Math functions are not supported in MTB for 20xx devices. Only for PSoC its available.

Regards,
Anjana

View solution in original post

AlPr_4646536
New Contributor II

thank you so much