Pumpkin, Inc.

Pumpkin User Forums

Undefined reference to OS_Delay()

If you can't make Salvo do what you want it to do, post it here.

Undefined reference to OS_Delay()

Postby z8379303 » Wed Jan 22, 2014 1:36 am

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?
Posts: 2
Joined: Wed Oct 16, 2013 12:13 am

Re: Undefined reference to OS_Delay()

Postby Andrew » Wed Jan 22, 2014 11:21 am

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.
Site Admin
Posts: 68
Joined: Mon Nov 30, 2009 6:43 pm

Return to Coding

Who is online

Users browsing this forum: No registered users and 3 guests