This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

[FAQ] What does the "Uninitialized Hwi object" or "Uninitialized Task object" mean in ROV

Guru 86635 points

Replies: 1

Views: 274

I'm using Runtime Object View (ROV) and I see the following:

Is this a problem or expected behavior? Can you please give more details?

Note: the same is show in ROV Classic.

  • TI-RTOS supports three modes of instance creation:

    1. Run-time create (e.g. Task_create): The create API allocates an object and initializes it accordingly.
    2. Run-time construct (e.g. Task_construct): For construct, the application supplies a module struct (so no object allocation is done in construct. The construct API initializes it accordingly. 
    3. Static create in the .cfg file (e.g. Task.create): A static object is defined and initialized accordingly.

    Both ROV products (Runtime Object View and ROV Classic) show objects created via #1 and #3 with no issues. A statically created task (#3) will always show up in ROV. A run-time created task will show up in ROV once it is created. It is removed from ROV if the task is deleted.

    #2 is where things get a little tricky! Remember, the application is providing the <Mod>_Struct that is passed into the <Mod>_construct call. The decision was made to have ROV show the <Mod>_Struct in ROV before the <Mod>_construct was called on it (debatable decision in hindsight). We felt that it might be helpful information. However, before the construct is called, that Struct is uninitialized, so instead of showing garbage (which we did for a few old releases), we have the "Uninitialized object" message.

    So consider the following code:

    Task_Struct task0Struct, task1Struct;
    
    int main()
    {
        Task_Params taskParams;
    
        Task_Params_init(&taskParams);
        taskParams.stackSize = TASKSTACKSIZE;
        taskParams.stack = &task0Stack;
        Task_construct(&task0Struct, (Task_FuncPtr)writerTask, &taskParams, Error_IGNORE);
        taskParams.stack = &task1Stack;
        Task_construct(&task1Struct, (Task_FuncPtr)readerTask, &taskParams, Error_IGNORE);

    If you had ROV open when you were at line 5 in the debugger, it would have the two "Uninitialized Task Object" messages (as shown in the original post). Once you run to over lines 10 and 12, you get this.

    So the short answer is this is not a problem. It's the normal and expected (and that we had a hard time finding the best short string to describe it). 

    Todd

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.