Page 1 of 1

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

PostPosted: Tue Feb 12, 2008 8:08 am
by skeegan
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


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

PostPosted: Wed Feb 13, 2008 11:55 am
by aek
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).]


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

PostPosted: Thu Feb 14, 2008 6:46 am
by skeegan
Thanks for the response.

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

PostPosted: Thu Feb 14, 2008 7:13 am
by aek
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.

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