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

PSoC™ 6 Forum Discussions

aliissa02
Level 4
5 likes given 25 replies posted 50 sign-ins
Level 4

I am getting a build error when I try to measure the temperature using thermistor. It's saying 

 prjM0120:Build error: undefined reference to Thermistor _GetTemperature'

 

Can anyone help?

0 Likes
1 Solution
ncbs
Moderator
Moderator 50 likes received 250 sign-ins 250 replies posted
Moderator

Hi @aliissa02,

I hope you have included the Thermistor.c and Thermistor.h files into your PSoC6 project. Please make sure you follow the instructions from 7:42 to 9:10 present in the video. 

I have attached the project which I've recreated at my end for your reference.

Regards,
Nikhil

View solution in original post

5 Replies
ncbs
Moderator
Moderator 50 likes received 250 sign-ins 250 replies posted
Moderator

Hi @aliissa02,

Are you using Thermistor Calculator component? The function you are using is int16 Thermistor_GetTemperature (uint32 resT).

After configuring the component, make sure you have built the project. This will generate the Thermistor.c and Thermistor.h files containing all the APIs. After this step, the APIs will be recognized in your application code. Also, I see a space in the API call displayed in the error log "Thermistor<space>_GetTemperature". Remove the space and try to build again, the project must positively build without any errors. 

Regards,
Nikhil

0 Likes
aliissa02
Level 4
5 likes given 25 replies posted 50 sign-ins
Level 4
Hello,

Thanks for your response. I have basically followed this video https://youtu.be/lME10oZX8b4 but not sure why it's giving this error.
prj.M0120:Build error undefined reference to Thermistor GetTemperature


It keeps saying this
0 Likes
aliissa02
Level 4
5 likes given 25 replies posted 50 sign-ins
Level 4
Hello,
 
Thanks for your response. I have basically followed this video https://youtu.be/lME10oZX8b4 but not sure why it's giving this error.
prj.M0120:Build error undefined reference to Thermistor GetTemperature
 
 
It keeps saying this
0 Likes
ncbs
Moderator
Moderator 50 likes received 250 sign-ins 250 replies posted
Moderator

Hi @aliissa02,

I hope you have included the Thermistor.c and Thermistor.h files into your PSoC6 project. Please make sure you follow the instructions from 7:42 to 9:10 present in the video. 

I have attached the project which I've recreated at my end for your reference.

Regards,
Nikhil

aliissa02
Level 4
5 likes given 25 replies posted 50 sign-ins
Level 4

It's working. Thanks alot!

0 Likes