C2000Ware source using inconsistent type definitions has parser errors after fix for EXT_EP-12834 in 22.6.3.LTS and 25.11.0.LTS

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-14868
    • Hide
      C2000_22.6.3.LTS
      C2000_25.11.0.LTS
      Show
      C2000_22.6.3.LTS C2000_25.11.0.LTS
    • Hide
      MSP430_21.6.2.LTS*
      C2000_25.11.1.LTS*
      C2000_21.6.2.LTS*
      C2000_22.6.4.LTS*
      Show
      MSP430_21.6.2.LTS* C2000_25.11.1.LTS* C2000_21.6.2.LTS* C2000_22.6.4.LTS*
    • default
    • Hide
      Use only consistent type definitions from stdint.h

      Or undo below fix from EXT_EP-12834 in include/machine/_types.h
      #else
          typedef short __int16_t;
          typedef unsigned short __uint16_t;
      To instead have this:
      #else
          typedef int __int16_t;
          typedef unsigned int __uint16_t;
      Then rebuild the RTS library using mklib.exe per spru514 user guide.
      Show
      Use only consistent type definitions from stdint.h Or undo below fix from EXT_EP-12834 in include/machine/_types.h #else     typedef short __int16_t;     typedef unsigned short __uint16_t; To instead have this: #else     typedef int __int16_t;     typedef unsigned int __uint16_t; Then rebuild the RTS library using mklib.exe per spru514 user guide.

      The fix for https://sir.ext.ti.com/jira/browse/EXT_EP-12834 changed the typedef for __int16_t and __uint16_t to use short instead of int.

      This exposed issues in C2000Ware projects where global variables do not consistently use only type definitions from stdint.h which then results in parser errors for incompatible types.

      Avoid the issue by only using the type definitions from stdint.h

      The following is a summary way to see the problem.

      C:\examples>type file.c
      #include <stdint.h>
      extern unsigned int name;
      extern uint16_t     name;
      
      C:\examples>cl2000 -I\ti\compilers\ti-cgt-c2000_22.6.2.LTS\include file.c
      
      C:\examples>cl2000 -I\ti\compilers\ti-cgt-c2000_22.6.3.LTS\include file.c
      "file.c", line 3: error: declaration is incompatible with "unsigned int name" (declared at line 2)
      1 error detected in the compilation of "file.c".
      
      >> Compilation failure
      

      The first command shows the source file. Declaring the same name twice in one file, with slightly different types, is not typical. It represents C2000Ware source doing the same thing, but across different header files. The second command shows that it builds clean when using version 22.6.2.LTS header files. The third command shows the error emitted when using version 22.6.3.LTS header files.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-6127 - C2000Ware source using inconsistent...
                SYNCHRONIZED
                • Last Sync Date: