Page 1 of 1

Undefined reference to OS_Delay()

PostPosted: Wed Jan 22, 2014 1:36 am
by z8379303
Hi. I am using mplabx IDE v1.90 and microchip c30 compiler.
I am using Salvo Pro library build.

When I try to compile my code, it gave me an error saying "undefined reference to OS_Delay()".
I navigated into "salvompt.h" and saw the code portion that defines OS_Delay() was greyed out.

The code portion here:
#define OS_Delay(delay) { \
OSDelay(delay); \
OS_Yield(); }
#define OS_Delay(delay) { \
OSDelay(delay, FALSE); \
OS_Yield(); }

That is because OSENABLE_DELAYS is False, which is because OSBYTES_OF_DELAYS in "salvo.h" is not defined. The code portion is below:

However, in library build, OSBYTES_OF_DELAYS should not be specified in salvocfg.h right?
Then the OS_Delay() can no way be defined?
So how should I fix this problem?

BTW, I have successfully built other salvo projects before; for some of them, there are also red lines under OS_Delay() but it can build. But this one just can't.

Can someone give me some suggestions?

Re: Undefined reference to OS_Delay()

PostPosted: Wed Jan 22, 2014 11:21 am
by Andrew
Please post your salvocfg.h -- it is misconfigured (the library is fine).

Also, ensure that the salvocfg.h you _think_ is being used is in fact the actual one. The simples way to prove this is to add
Code: Select all
#error Aha!
to it, and recompile.