Can not compile sin function with argument, ie y=sin(x); with PsoC 5LP chip.

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

cross mob
MiBe_333556
Level 1
Level 1
First like received

I get an error when compiling a Math functions with an argument such as y=sin(x) using a PSoC 5LP chip.

prj.M0120: Build error: undefined reference to `sin`.

Is there a way around this?

Mike

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I needed add m in both compiler and linker config

000-Additional_Librarry.JPG

001-linker.JPG

Serial_Plot.JPG

Attached is a trivial sin value print out program using CY8CKIT-059, just for compiling reference.

moto

View solution in original post

0 Likes
2 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I needed add m in both compiler and linker config

000-Additional_Librarry.JPG

001-linker.JPG

Serial_Plot.JPG

Attached is a trivial sin value print out program using CY8CKIT-059, just for compiling reference.

moto

0 Likes

Thanks Moto that solved the problem. It worked with just adding the m to the Linker Config.

Thanks again, Mike