Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hi, friends. I'm developing an application based on sysbios and I have some question about how to extract useful info , such as PC and local variables, from task stack .
I'm using bios_6_52_00_12 on C6678.
Our customer needs to switch tasks from one core to another during runtime.
I have put the task function in share memory so function code can be reached through function pointer in different cores.(I have tested this, and it work fine)
The next thing I want to do is :
For example, I have a taskA running on core0. Now I want to switch taskA to core1. So I copy taskA 's task stack and send to core1 and terminate taskA. In core1 I will create a new task and rewrite its stack using taskA's task stack . Obviously I cannot rewrite all of them but just a specific area by which I am confused.
What task info is required when switching task from one core to another? How can I extract them from task stack?
I have read the sysbios docs and found that I can use Void Task_stat(Task_Object *tsk, Task_Stat *statbuf) to get task stat.
But when I look into the type of task stack, I find that it is a pointer and I can't find what the structure of the stack look likes.
Besides, I want to know what sysbios do when it schedule task so I read task_schedule() and I find it use Task_SupportProxy_swap() when switch task context.
but I cannot see the souce code of Task_SupportProxy_swap(). I don't know where I can see it. It may help to make me know what info is useful if I want to switch task from one core to another.
Thanks for your kindly help!