I'm an ICC12 user rather than a CW user so I don't have any directly
useful suggestions, however splitting your stack by page is not
advisable. It is certainly not portable to another chip family.
Knowledge of scheduler strategies (ie: interrupt to context switch) is
publicly available. Check out uexec by Richard Man (creator of ICC12)
and FreeRTOS. Another good place to look is a JJ Labrosse's book
"MicroC/OS-II" (though the OS isn't free). Rolling your own OS might be
beneficial for one's understanding of the internals but it isn't time
well spent if there is a deadline. Better to use something that has
already been proven and concentrate on the app layer.
-rob
sgriffi3@... wrote:
>
> Hello Again,
>
> I am a computer engineering student at Gonzaga University, and am
> working on a delivery robot with 3 other guys for our senior design
> project. I sent out an email about 2 weeks ago about paging on the
> MC9S12DP512 processor.
>
> We made the decition to scrap AxIDE and start using Codewarrior 5.9.0.
> So far this has been much more helpfull.
>
> The question I have for you all is this: How do I manipulate the PPage
> register and other paging information.
>
> We are using an executive to control the program flow, this program
> when used in normal memory would just store the stack pointers of the
> tasks along with scheduling what task to run next, and loading the new
> stack value. Hopefully we want this executive to control what page we
> are on as well. So Task0 would be on page 20, Task1 would be on page
> 21 and so on.
>
> At the moment I am clear on how to get the Tasks in to the pages, but
> I am having problems with keeping track of and storing the PPage
> register.
>
> The executive is acessed by a SWI interrupt, which also might be a
> problem. Is there a way to go from a page to an interrupt, store the
> page info, then jump to a different page?
>
> I apoligize if this is unclear, let me know if I can provide more
> information.
>
> Thank you,
> Scott
>
>