Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Bluetooth SDK

AlPr_4646536
Level 2
5 replies posted 5 questions asked First like received
Level 2

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 First comment on KBA 5 questions asked First question asked
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
Level 9
First comment on KBA 1000 replies posted 750 replies posted
Level 9

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
Level 2
5 replies posted 5 questions asked First like received
Level 2

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 First comment on KBA 5 questions asked First question asked
Moderator

Hi AlPr_4646536 ,

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

Regards,
Anjana

AlPr_4646536
Level 2
5 replies posted 5 questions asked First like received
Level 2

thank you so much