Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

MicroC compiler help: microRTOS

Status
Not open for further replies.

bukhari917

Member level 1
Joined
Mar 27, 2011
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Pakistan
Activity points
1,630
hello everyone!

i'm trying to run the code given in this paper.
.
.
.
.

///*
static unsigned int i=0;
InitTask(1,1);

while(1)
{
while(PORTB.F1);
flag=0;
} //*/
}



//
//Start flashing
//


void Task2(void)
{ //*

InitTask(2,1);

while(1)
{
while(PORTB.F2);
flag=1;
.
.
.
and getting this error:

99 324 "Undeclared identifier 'flag' in expression test.c"

i'm using MicroC as discussed in paper, and trying it for PIC18F2685

this "flag" is not declared in the code, then whats wrong m i doing?
thnx for your time
 

embeddedlover

Full Member level 5
Joined
Aug 10, 2007
Messages
279
Helped
46
Reputation
92
Reaction score
38
Trophy points
1,308
Activity points
3,155
You yourself say that flag is not declared, that itself is the problem...declare the variable first
 

bukhari917

Member level 1
Joined
Mar 27, 2011
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Pakistan
Activity points
1,630
You yourself say that flag is not declared, that itself is the problem...declare the variable first
as i have just mentioned, its not my code, i'm copying the code from the above given link, so he has not declared flag...and i don't know what register's bit should be named as flag, or how to declare it :-:)-:)-(
 

embeddedlover

Full Member level 5
Joined
Aug 10, 2007
Messages
279
Helped
46
Reputation
92
Reaction score
38
Trophy points
1,308
Activity points
3,155
After seeing the above snippet it seems flag is a independent variable...Try to declare it and check.
 

cdafg

Newbie level 1
Joined
May 2, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,284
hello everyone!

i'm trying to run the code given in this paper.
.
.
.
.

///*
static unsigned int i=0;
InitTask(1,1);

while(1)
{
while(PORTB.F1);
flag=0;
} //*/
}



//
//Start flashing
//


void Task2(void)
{ //*

InitTask(2,1);

while(1)
{
while(PORTB.F2);
flag=1;
.
.
.
and getting this error:

99 324 "Undeclared identifier 'flag' in expression test.c"

i'm using MicroC as discussed in paper, and trying it for PIC18F2685

this "flag" is not declared in the code, then whats wrong m i doing?
thnx for your time
hii i'm newbie here.. could u please post here all the code from the article and say how u solve that flag problem?
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top