Pumpkin, Inc.

Pumpkin User Forums

ISR problem

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

ISR problem

Postby luben » Tue Dec 19, 2000 10:25 am


After I tried to add in my interrupt routine OSSignalBinSem() (before that I set in salfocfg.h
- and #define OSEVENTS 2
- before interrupt I put #pragma interrupt_level 0)

I get the message
function _OSRtnEventPtr appears in multiple call graphs: rooted at intlevel0 and _main

that means that Salvo doesn't understand that OSSignalBinSem is correctly called (from level 0 or 1 of calls depth).


Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: ISR problem

Postby Salvo Tech Support » Tue Dec 19, 2000 11:24 am

Hi Luben.

1) Recall that you cannot change anything in the salvocfg.h that's supplied with the freeware libraries, except OSEVENTS and OSTASKS. That's because the libraries contain sections of code that are dependent on the configuration settings.

By setting OSCALL_SIGNALBINSEM to OSFROMANYWHERE, you're changing it from its default value -- the value that the libraries expect. OSENABLE_BINARY_SEMAPHORES's default value is TRUE, so that's OK. The default values are all listed in the User Manual.

2) Apart from changing the values of these configuration parameters, you did everything right :-). What you're seeing is a limitation of the freeware libraries -- they were not compiled to allow for OSCALL_OSSIGNALXYZ other than OSFROM_BACKGROUND. Therefore no matter what you do with your main.c and salvocfg.h, you will always get this error.

We are trying to design a way for freeware library users to be able to signal events from interrupts and/or from mainline code. We will incorporate this into the next release (v2.2) of the freeware libraries.

Note that this is not an issue with the full version of Salvo, only with the precompiled freeware libraries. And this has nothing to do with Salvo per se, it is simply an artifact of the "stackless" design of the PIC C compiler. It's not good or bad, it's simply something that must be managed by PIC C programmers wishing to call the same function from both mainline and interrupt code.

As mentioned above, this restriction will be removed from the v2.2 freeware libraries. For now, it means that you can only signal and create events from mainline code with the v2.1 freeware libraries.

Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Re: ISR problem

Postby aek » Tue Dec 19, 2000 11:28 am

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

Return to Coding

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests