Pumpkin, Inc.

Pumpkin User Forums

_OSLabel() and PIC18 / C18

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

_OSLabel() and PIC18 / C18

Postby dfnr2 » Mon Jun 04, 2012 6:16 am


I've been integrating Salvo v3.2.3 into my current application, and I think it's a great system.

Looking at the definition of OSCtxSw() in portpic18.c, no parameter is passed, and OS_Yield(label) discards the dummy parameter. I gather that the label is required for compilers that use compiled-in jumps to simulate the stack flow. Is that correct? If so, then for C18 v3.40, couldn't I just create a single _OSLabel(OSHere) definition (for example), and then just use OSHere for the label in all the declarations?

If that's the case, I could see it would actually be nice to just alter the definitions throughout the code to eliminate the label, but I think that would not be a great return on time invested with respect to my current project.

Thanks for creating such a great tool!

Posts: 1
Joined: Thu May 24, 2012 5:04 pm

Re: _OSLabel() and PIC18 / C18

Postby Andrew » Tue Jun 05, 2012 7:41 am

Salvo 4 eliminated labels -- but Salvo 3 requires them.

The simples thing is to do e.g. "OS_Delay(5, label);"

I.e. use the literal "label" in each context-switching macro.
Site Admin
Posts: 68
Joined: Mon Nov 30, 2009 6:43 pm

Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 1 guest