Pumpkin, Inc.

Pumpkin User Forums

MsgQ - Weird error??

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

MsgQ - Weird error??

Postby Code_Nerd » Sat Jun 24, 2006 2:56 am

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).]

Code_Nerd
 
Posts: 24
Joined: Sun Apr 23, 2006 11:00 pm

Re: MsgQ - Weird error??

Postby aek » Sat Jun 24, 2006 4:18 am

What's the error?

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: MsgQ - Weird error??

Postby Code_Nerd » Sat Jun 24, 2006 5:40 am

LOL... I could have sworn I posted it up!!
quote:
Error - could not find definition of symbol 'BARGB1' in file 'msgq3.o'.
Code_Nerd
 
Posts: 24
Joined: Sun Apr 23, 2006 11:00 pm

Re: MsgQ - Weird error??

Postby aek » Sat Jun 24, 2006 7:31 am

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 ?

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: MsgQ - Weird error??

Postby Code_Nerd » Sat Jun 24, 2006 8:53 am

I couldnt tell what ones I am running? The libraries were obtained from my University...
Code_Nerd
 
Posts: 24
Joined: Sun Apr 23, 2006 11:00 pm

Re: MsgQ - Weird error??

Postby Code_Nerd » Sun Jun 25, 2006 4:42 am

Is there any difference between the free and licenced versions of Salvo??
Code_Nerd
 
Posts: 24
Joined: Sun Apr 23, 2006 11:00 pm

Re: MsgQ - Weird error??

Postby aek » Sun Jun 25, 2006 6:57 am

Well, download the new ones and compare the dates ...

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

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: MsgQ - Weird error??

Postby aek » Sun Jun 25, 2006 7:32 am

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 0 guests

cron