Hi Shishir,
when RIOT initially starts up, the CPU is normally running in interrupt
mode (using the interrupt mode stack). After creating the stacks for the
main and the idle threads, the CPU must be put into thread-mode. This
means the main threads initial context needs to put into the CPUs
registers and the stack pointer must put to the main-threads stack.
After this is done the CPU can just do 'normal' task switching for
switching between threads.
So to put it short: in cpu_switch_context_exit() you simply must load
the main threads context into the CPUs register and point the stack
pointer to the main threads stack.
Let me know if you need further information!
Cheers,
Hauke
On 12.01.2015 15:35, shishir tiwari wrote:
Hey Everyone,
I have been porting RIOT OS to new processor(ARC) and i had compilied
hello world program successfully.
When i debug the helloworld.elf in kernel_init function the
thread_create() function has execute successfully.But the thread
"idle_thread" "and main_trampoline" function is not been called. why?
What is thing need to be done on this cpu_switch_context_exit()
function. please explain me.
Thanks
Shishir Tiwari
_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/devel