Page 1 of 1

MsgQ - Weird error??

PostPosted: Sat Jun 24, 2006 2:56 am
by Code_Nerd
I have encountered a weird error while trying to compile my code with MPLAB 7.32 and C18 3.02..
code:
#include <salvo.h>
#include <delays.h>

#define TASK_1_P OSTCBP(1)
#define TASK_2_P OSTCBP(2)

#define MSGQ_P OSECBP(1)
#define MSGQCB_P OSMQCBP(1)

#define SIZE_OF_MSGQ 10

OSgltypeMsgQP MsgQBuff[SIZE_OF_MSGQ];


void task1()
{
static unsigned char value[10];
unsigned char x;
OStypeMsgP msgP;
for(x = 0; x < 10; x++)
{
Delay10KTCYx(400);
value[x] = PORTB;
OSSignalMsgQ(MSGQ_P, (OStypeMsgP) &value[x]);
}
OS_Yield();
}

void task2()
{
unsigned char total = 0;
OStypeMsgP msgP;
while(!OSMsgQEmpty(MSGQ_P))
{
msgP = OSTryMsgQ(MSGQ_P);
total += *(unsigned char*)msgP;
}
PORTC = total;
OS_Yield();
}

void main()
{
OSInit();
OSCreateTask(task1, TASK_1_P, 1);
OSCreateTask(task2, TASK_2_P, 1);


OSCreateMsgQ(MSGQ_P, MSGQCB_P, MsgQBuff, SIZE_OF_MSGQ);

TRISB = 0xFF;
TRISC = 0x00;

for(;; )
OSSched();
}


Thankyou

[This message has been edited by Code_Nerd (edited June 24, 2006).]


Re: MsgQ - Weird error??

PostPosted: Sat Jun 24, 2006 4:18 am
by aek
What's the error?

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


Re: MsgQ - Weird error??

PostPosted: Sat Jun 24, 2006 5:40 am
by Code_Nerd
LOL... I could have sworn I posted it up!!
quote:
Error - could not find definition of symbol 'BARGB1' in file 'msgq3.o'.

Re: MsgQ - Weird error??

PostPosted: Sat Jun 24, 2006 7:31 am
by aek
Are you using the new Salvo libraries for MPLAB v3.02 and higher, as per http://www.pumpkininc.com/salvo/lite/pic/3.2/versions.txt ?

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


Re: MsgQ - Weird error??

PostPosted: Sat Jun 24, 2006 8:53 am
by Code_Nerd
I couldnt tell what ones I am running? The libraries were obtained from my University...

Re: MsgQ - Weird error??

PostPosted: Sun Jun 25, 2006 4:42 am
by Code_Nerd
Is there any difference between the free and licenced versions of Salvo??

Re: MsgQ - Weird error??

PostPosted: Sun Jun 25, 2006 6:57 am
by aek
Well, download the new ones and compare the dates ...

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


Re: MsgQ - Weird error??

PostPosted: Sun Jun 25, 2006 7:32 am
by aek