Other Parts Discussed in Thread: CC2640
Tool/software: TI-RTOS
Hi, sir,
I met a strange problem. When I wrap a Task_Struct in a user defined struct, ROV will not display the information of tasks.
Here is what I did in raw example multi_role in simplelink_cc2640r2_sdk_1_30_00_25:
struct my_task {
int task_id;
int priority;
uint8_t *name;
uint32_t stack_size;
uint8_t *task_stack;
Task_Struct *task_obj;
};
static struct my_task myMultiRoleTask;
void multi_role_createTask(void)
{
Task_Params taskParams;
// Configure task
Task_Params_init(&taskParams);
taskParams.stack = mrTaskStack;
taskParams.stackSize = MR_TASK_STACK_SIZE;
taskParams.priority = MR_TASK_PRIORITY;
myMultiRoleTask.name = "multi role";
myMultiRoleTask.task_id = MR_TASK_PRIORITY;
myMultiRoleTask.priority = MR_TASK_PRIORITY;
myMultiRoleTask.stack_size = MR_TASK_STACK_SIZE;
myMultiRoleTask.task_obj = &mrTask;
Task_construct(myMultiRoleTask.task_obj, multi_role_taskFxn, &taskParams, NULL);
}
Step 1:
when cc2640 is halt before myMultiRoleTask.task_obj = &mrTask, everything is OK
but When this sentence is executed, there are something wrong in ROV
And if I use a single Task_Struct mrTask instead of wrapping it in a struct , no errors appeared:
Could anyone tell my why?
I guess that this error has relationship with data access alignment(Interfaces in ROM are all heavily optimized, so common 4bytes aligned access may cause exception)?