Page 1 of 1

Stack in salvo

PostPosted: Mon Mar 08, 2004 5:59 am
by sandhya
Hi,

We are using PIC18F8620 processor with Salvo RTOS. I am responsibile to come up with a memory model for our system. I am not sure how salvo handles stack. How and where does it stores the register values, and the return addresses when there is an interrupt? How and where does it stire values when the user pushes and pops addresses/ data? Can you please explain me.


Re: Stack in salvo

PostPosted: Mon Mar 08, 2004 7:34 am
by aek
The simplest way to explain how Salvo uses the stack on the PIC18 is to say that Salvo's stack usage is the same as that of a typical foreground / background "main loop" application, with an extra 4 bytes (I believe) of stack usage because the tasks are dispatched via a call-by-pointer in Salvo's scheduler, OSSched().

Apart from reviewing the Salvo User Manual and Compiler Reference Manuals, I would recommend that you install Salvo Lite, and then step through a tutorial (say, tu5) in either C or assembly, while watching the SP registers -- that'll give you a clear overview of what it's doing.

Interrupt processing is just like any other application.

If the user is explcitly pushing and popping data, as long as any pushes are undone by pops before the next context switch, then there shouldn't be any impact on Salvo.

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


Re: Stack in salvo

PostPosted: Mon Mar 08, 2004 7:44 am
by sandhya
hi,
I am not able to view your reply on "Stack in Salvo" under General Forums

Re: Stack in salvo

PostPosted: Mon Mar 08, 2004 8:50 am
by aek
Reload the page in your browser?

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