Pumpkin, Inc.

Pumpkin User Forums

Labels needed for PIC18 compiled with c18 v3.2.2-dev7

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Labels needed for PIC18 compiled with c18 v3.2.2-dev7

Postby skeegan » Tue Feb 12, 2008 8:08 am

I've just taken over a project using salvo on a PIC18.

In the salvo user manual it states

"Salvo generally requires that you use a unique label for each context switch"

and in the mcc18 reference manual it states under context switch:

"_OSLabel required? no"


Most of the code that I have inherited does have unique labels for most of the context switch calls, but in a number of cases the same label is used for a bunch of separate context switch calls.

Could someone please let me know if this is valid, and why?

------------------
skeegan

skeegan
skeegan
 
Posts: 2
Joined: Tue Feb 12, 2008 12:00 am
Location: chelmsford, MA

Re: Labels needed for PIC18 compiled with c18 v3.2.2-dev7

Postby aek » Wed Feb 13, 2008 11:55 am

For Salvo v3 PIC with MPLAB C18, unique labels are not required (and the _OSLabel directive isn't required, either).

If you don't need cross-compiler support (e.g. the ability to compile your code with both MPLAB-C18 and PICC-18), then just use the string "label" in each context switch, i.e.

code:
OS_Delay(27,label);

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

[This message has been edited by aek (edited February 13, 2008).]

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

Re: Labels needed for PIC18 compiled with c18 v3.2.2-dev7

Postby skeegan » Thu Feb 14, 2008 6:46 am

Thanks for the response.
skeegan
skeegan
 
Posts: 2
Joined: Tue Feb 12, 2008 12:00 am
Location: chelmsford, MA

Re: Labels needed for PIC18 compiled with c18 v3.2.2-dev7

Postby aek » Thu Feb 14, 2008 7:13 am

Sorry about the initial delay -- the copyright symbol in the name of this forum causes problems when responding to posts via FireFox ... but not (as I eventually found out) via IE. Weird.

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

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


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 3 guests

cron