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.

DSP BIOS - TSK_getname()

Hello,
The question is about Code composer DSP/BIOS function:

I am trying to print the current running task name in Message Log. I have the same function activated in different tasks. In this function I have added a line to print the task name:

LOG_printf(&trace,"Task Name is: %s",TSK_getname(TSK_self));

When compiling I get an error:
Error: identifier "TSK_self" is undefined. This is despite the fact that editor recognizes and paints the argument in blue.

Without this identifier compilation returns an error of empty function argument .

Please help.
Thanks

P.S. Can anyone direct me to document describing the DSP BIOS functions, including their arguments? I found so far a brief description of those functions in SPRU403O and SPRU423D, but there is no detailed information on all the functions.

  • I guess you have missed the open and close braces for TSK_self funtion.

    Arye Lerner said:

    LOG_printf(&trace,"Task Name is: %s",TSK_getname(TSK_self));

    When compiling I get an error:
    Error: identifier "TSK_self" is undefined. This is despite the fact that editor recognizes and paints the argument in blue.

    Change the statement to:

    LOG_printf(&trace,"Task Name is: %s",TSK_getname(TSK_self()));

     

    Arye Lerner said:

    P.S. Can anyone direct me to document describing the DSP BIOS functions, including their arguments? I found so far a brief description of those functions in SPRU403O and SPRU423D, but there is no detailed information on all the functions.

    Please refer to http://focus.tij.co.jp/jp/lit/ug/spru404n/spru404n.pdf for information on TSK APIs.

     

  • Hello,

    Thanks, it compiles now, but when executing The program, I get in log window:

    *** ERROR: 0x0 0xa """

    ...

    *** ERROR: 0x0 0x19 """

    ...

    in this line instead.

    When I tried to cast the TSK_self() function with (char*), the log window remain empty (no logs were displayed)

    I expect the TSK_getname() to return a string with task name. Is it ok to use this function in LOG_printf()?

     

    Thanks

  • According to the API guide you should have no problem passing a string argument through LOG_printf(). I don't see any reason the code suggested by Nag wouldn't work. What happens if you pull the TSK_getName(TSK_self()); call out of the printf and store it in a character buffer beforehand - do you see the proper data?