Page 1 of 1

Stack error

Posted: Fri Apr 21, 2006 12:17 pm
by KieranFoot
I am having a problem implamenting the scheduling system from the OSD tutorials, I have made simple chqnges to the scheduler system by adding two function add_task() and destroy_task().

It seems that somewhere along the line ESP is being zeroed ???

I have checked and it seems that when the timer interrupt is being called whilst multitasking is enabled the ESP value is being skrewed with and ends up above bounds, crossing into the top of the next tasks stack...

However I have allways had this problem with the OSD tutorial's schedule() system...

Re:Stack error

Posted: Fri Apr 21, 2006 12:44 pm
by paulbarker
Is the timer interrupt executing correctly?

Have you remapped external interrupts to avoid builtin exceptions?

Have you tried dumping the stored registers to the screen before reloading them?

Re:Stack error

Posted: Fri Apr 21, 2006 1:06 pm
by KieranFoot
That would be done in setjump???