math.h in modus toolbox 2.1

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

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

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

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
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

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=

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

Hi AlPr_4646536 ,

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

Regards,
Anjana

thank you so much