Link Error in Timer Sample program - timer_m52259evb.mcp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Link Error in Timer Sample program - timer_m52259evb.mcp

1,384 Views
lel_chen
Contributor I

Hi,

         In the sample program for timer[timer_m52259evb.mcp], I face the following linker errors:

-------------------------------------------------------------

Link Error: Undefined: "_timer_cancel"
Referenced from "main_task" in main.c
Link Error: Undefined: "_timer_create_component"
Referenced from "main_task" in main.c
Link Error: Undefined: "_timer_start_periodic_at_ticks"
Referenced from "main_task" in main.c
-------------------------------------------------------------

 

The header file <timer.h> has been included.

Is it because of any issue in the linking order of files?

 

How can I resolve this issue?  Kindly help.

 

Thanks,

Chen

0 Kudos
Reply
2 Replies

526 Views
PetrM
Senior Contributor I

Hello,

 

the functions were not compiled at all. You have to set MQX_USE_TIMER macro to 1 in your user_config and rebuild PSP and BSP libraries. Setting it and just recompiling example doesn't work.

 

Regards,

PetrM

 

0 Kudos
Reply

526 Views
AHSun
Contributor I

Hi~ I met the same situation, and don't have some idea to solve.

Have you find some solution method?

 

Thanks

 

Sun

0 Kudos
Reply