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.

SYS/BIOS CSL conflict

Hi all,

 

I am having a problem with conflicting typedefs in CSL and SYS/BIOS.  In the CSL file tistdtypes.h is this definition:

typedef char        Int8;

and in the XDC file std.h Int8 is typedef'd slightly differently:

typedef signed char xdc_Int8;

typedef xdc_Int8        Int8;

 

The incompatibility is due to the inclusion of  "signed" in the xdc file, presumably done since some platforms allow the default char type to be unsigned.  Shouldn't these two things play nicely together?  Would this be considered a bug in the CSL?

I am using:

XDCTools 3.20.06.81, CGT 7.0.4, CCSv 4.2.1.00004 , SYS/BIOS 6.31.02.23 and CSL for the C6457 (not sure if there is more version number than that).

Many thanks,
Brady

 

  • Hi Brady --

    Can you try putting the #include <xdc/std.h> before any other #include's in your .c file?  <xdc/std.h> (indirectly via ti/std.h) does a #define of the _TI_STD_TYPES which should keep the csl.h file from doing the duplicate typedefs.  I think Int8 should probably be signed (there is also a UInt8 for unsigned).  I'm not sure how 'char' behaves if it doesn't have the signed/unsigned keyword.

    -Karl-

  • Karl,

    Yes, it works without complaint if I put all of the bios includes before the csl includes, but it was also my point (as you state) that it seems like the csl should explicitly declare Int8 signed as that is clearly what it is supposed to be, and "char" by itself (i.e., the current definition), is not necessarily signed.

     

    -Brady