Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22172

RTOS: MSP432E401Y | Get Task instance name in runtime

$
0
0

Tool/software: TI-RTOS

Hello,

I have a following code to get task name durning runtime:

///--------------------------------------------------------------------------
///
static char * getContext()
{

    BIOS_ThreadType type = BIOS_getThreadType();

    if(type == BIOS_ThreadType_Hwi){
        sprintf(context, " >> %-20s: ", "HWI" );

    } else if (type == BIOS_ThreadType_Swi){
        sprintf(context, " >> %-20s: ", "SWI" );

    } else if (type == BIOS_ThreadType_Task){
        sprintf(context, " >> [%d]%-17s: ", Task_getPri(Task_self()), Task_Handle_name(Task_self()));

    } else if (type == BIOS_ThreadType_Main){
        sprintf(context, " >> %-20s: ", "Main" );

    } else{
        sprintf(context, "UNDEFINED");
    }

    return context;
}

Unfortunately it is not working on MSP432 platfrom only with TM4C. I set the following code in cfg file without any success:

Task.common$.namedInstance = true;

Any idea?


Viewing all articles
Browse latest Browse all 22172

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>