cancel
Showing results for 
Search instead for 
Did you mean: 

linker claims "undefined reference to osTimerCreate()" despite #include "cmsis_os.h"

WPles.1
Associate II

Hello,

I am setting up just a simple task with a timer in CMSIS V.2 that triggers a periodic call of a callback function.
Despite the fact that I am including "cmsis_os.h", which is part of my project, I get the linker error "undefined reference to `osTimerCreate'".

Does anybody have an idea other than "switch to CMSIS V.1"?

Thanks in advance
Wilfried

2 REPLIES 2

An include file typically ISN'T CODE, it describes the interface expectations, find the file with the backing source code for the function, and add that to the project.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

thanks, Tesla DL, but the root of the problem was that I was mislead to CMSIS 1, when I was googling for osTimerDef at Keil. The 'osTimeCreate' function was replaced by 'osTimeNew' in CMSIS 2.

Thanks for your willingness to support,
Wilfried