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

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

1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
Beta tester First comment on KBA 1000 replies posted

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)
Beta tester First comment on KBA 1000 replies posted

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