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.

Setting task name

CCS: Version: 6.1.2.00015
Tiva Eval Board: EK_TM4C1294XL
TivaWare_C_Series-2.1.2.111
xdctools_3_31_01_33_core
tirtos_tivac_2_14_04_31

I have built an application that dynamically creates tasks. 

Included in my class instance for each task created is a name associated with the task.

When an exception occurs in a task, the following is shown in the dump:
    Task name: {unknown-instance-name}, handle: 0x20008048.

Is there anything I can do when creating a task so that 'unknown-instance-name' is replaced with my task name?

  • Hi Greg,

    Could you try adding the following line to your .cfg file?

    Task.common$.namedInstance = true;

    This is useful for dynamic Task names to show up in some of the TIRTOS visualization tools.

    Best regards,

    Vincent

  • I added the line, but it made no difference, but in any case, I had not found any documentation indicating how to set the name of a dynamic task.

    I assume it would be an element of 'Task_Params', but I didn't see any elements in the struct that looked appropriate.

    Which element should I point at my task name?

  • Hi Greg,

    According to this thread, you can set the name as follows:

        // create the task
        Error_init(&eb);
        Task_Params_init(&taskParams);    // set defaults
        taskParams.priority = priority;
        taskParams.instance->name = "Initialization Task";
        gl_os_init = Task_create(task_init, &taskParams, &eb);

    Best regards,

    -Vincent