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.

tsk.h error

Hi, I am compiling a code for C6657. Its a BIOS project, and I am working on a control thread. Whenever I try to compile my code (it is mostly a stub code), i get error #170 function type is not allowed here, in the file tsk.h at line 118,  from BIOS include directory. If I comment out that line from the header itself, the code just compiles without any error. Can someone point out whats happening here 

  • Hi Kedar_Joshi,

    I'm going to need a bit more information in order to help you.  Please let me know the following details:

    1. Which version of BIOS are you using?
    2. Compiler (code gen tools) version?
    3. CCS version?

    Can you please paste a screen shot of the error message you are seeing?

    Steve

  • Hi Steve, Thank you for your reply. I am using

    1) BIOS 6.33.6.50

    2) compiler is  7.4.2 and XDCtools 3.24.5.48

    3) CCS v 5.3.0.00090

    Thanks

    Kedar

  • Kedar,

    I'm just curious, why are you including the 'ti/bios/include/tsk.h" file?  This is a file for legacy support of DSP/BIOS 5.x when building using SYS/BIOS 6.x.  Are you converting a legacy BIOS 5.x (or earlier) application to build with SYS/BIOS 6.33.06.50?

    Can you please reply and attach your *.cfg file?

    Also, can you show me what line 118 of your tsk.h file looks like?  I looked at tsk.h at line 118 of my SYS/BIOS 6.33.06.50 installation and it's the 'errno' member field of the TSK_Glue structure:

    typedef struct TSK_Glue {
        Fxn         fxn;                    /* TSK task function */
        Arg         args[TSK_MAXARGS];
        Int         errno;     // <-------------------------- line 118 of my tsk.h ... is this the same line as your file?
    } TSK_Glue;

    Steve

  • Hi Steve,

    Yes I am porting an old DSP BIOS app to the new processor, with 6.33.06.50. The struct you posted is same as in the file I have. 

    8132.app.cfg

    And what I have seen is, if I change the identifier "errno" to something else, the error goes away!! 

  • The cfg file you attached looks like it came from one of the SYS/BIOS examples.  Are you trying to use that in place of your legacy *.tcf file?

    Have you seen the BIOS legacy support application note?  It provides the steps needed to port a legacy app to build with SYS/BIOS 6.x.

    You can find it under your installation, for example it's here on my machine:

        C:\ti\CCS5.3.0.00090\bios_6_34_02_18\docs\Bios_Legacy_App_Note.pdf

    I would highly recommend looking at that.

    Steve

  • I looked into this a bit.

    Your .c file must be include <errno.h> before <tsk.h>.

    I see that errno.h has the following code:

       #if defined(__TMS320C6X__) && defined(__TI_EABI__)
       /*------------------------------------------------------------------------*/
       /* Under EABI, use function to access errno since it likely has TLS in    */
       /* a thread-safe version of the RTS library.                              */
       /*------------------------------------------------------------------------*/
        extern int *__c6xabi_errno_addr(void);
        __TI_TLS_DATA_DECL(int, __errno);

        #ifdef __cplusplus
         #define errno (*::std::__c6xabi_errno_addr())
        #else
         #define errno (*__c6xabi_errno_addr())
        #endif

    Which does a #define for errno to a function which is causing problems for that 'errno' field name within tsk.h.    I think we need to update tsk.h to use a different field name to avoid this conflict.  I filed a CQ to address this.

    The easy workaround is to #include <errno.h> _after_ <tsk.h> in your .c file.

    I'm not sure how much BIOS 5.x code you are porting to BIOS 6.x, but I'd recommend that you use native BIOS 6.x APIs instead of the <ti/bios> legacy support.  This will help with portability to other new devices in the future and avoid some gaps in the legacy support.

    -Karl-