Readme for MSP430 Code Generation Tools v21.6.2.LTS

Table of Contents


Long-Term Support Release


The MSP430 CGT v21.6.x.LTS release is an LTS (Long-Term Support) release.

Definitions


Compiler Documentation and Information


Documentation for the “TI MSP430 Optimizing Compiler User’s Guide” and the “TI MSP430 Assembly Language User’s Guide” is available online at:

https://www.ti.com/tool/MSP-CGT


TI E2E Community


Questions concerning TI Code Generation Tools can be posted to the TI E2E Community forums at:

The following is the top-level webpage for all of TI’s Code Generation Tools.

If submitting a defect report, please attach a scaled-down test case with command-line options and the compiler version number to allow us to reproduce the issue easily.


Defect Tracking Database


Compiler defect reports can be tracked at the Development Tools bug database at:

https://sir.ext.ti.com/


New Features:



Enumerated type changes


The exact type chosen for enumerated types and for enumeration constants has changed from previous branches for certain compilation modes. In particular, the compiler will now choose the same signedness for the underlying integer type for enumerated types in strict C mode as it always did in relaxed (default) C mode; the size of the underlying types chosen does not change.

That is, in strict ANSI mode, sometimes the compiler chose a signed type when it should have chosen the corresponding unsigned type. Also, the exact type of some enumeration constants may change in C mode. The C standard requires that all enumeration constants that will fit in “signed int” must have type “signed int,” which was not being observed in previous versions. Most programs will not be able to tell the difference. If you don’t assign an integer that does not correspond to an enumeration constant belonging to the enumerated type to a variable of that enumerated type, and you don’t perform arithmetic on enumerated types or enumeration constants, it is extremely difficult to tell the difference between the old behavior and the new behavior.

See the compiler user’s guide for the precise details of how underlying integer types for enumerated types and the types of enumeration constants are chosen.


Performance improvements



Generate CRCs over memory ranges


Along with generating CRCs over output sections, the compiler can now generate CRCs over certain memory ranges. This feature is enabled by some new syntax added to the linker command file.

MEMORY
{
   GROUP
   {
      MEMRANGE1 : origin = 0x000000, length = 0x000100
      MEMRANGE2 : origin = 0x000100, length = 0x000100
   } crc(_symbol, algorithm="CRC32_PRIME")
}

The MEMORY directive now supports a top-level GROUP keyword, which will let users specify logical groups of memory ranges. These groups can then be CRC’ed by invoking the ‘crc’ operator.

The above is a snippet of a linker command file. The file describes two memory ranges that span from 0x0 -> 0x200, and there’s crc invocation that will compute a CRC32_PRIME over that range of memory.

Like CRC tables, the result will be stored in a table format, that’s accessible from the runtime via a linker-generated symbol (‘symbol’ in the example above). See the user guide for more information regarding the format of the table.

All CRC algorithms supported by CRC tables will also be supported by CRCs over memory ranges.

CRCs over memory ranges can only be computed over continuous blocks of memory that are on the same page. This means that there can be no gaps between any of the memory ranges included in a GROUP.


Misra support deprecated


Misra support has been deprecated and removed from this LTS release. The MISRA checking functionality will be disabled.
The --check_misra option is deprecated and issues a Warning.
The --misra_advisory and --misra_required options are deprecated and issue a remark.
All 3 options have no effect.


Resolved defects


Resolved defects in v21.6.2.LTS:

ID Summary
CODEGEN-14903 parser converts gnu statement expressions in for loops to incorrect loop increment that occurs too early in loop code
CODEGEN-14868 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
CODEGEN-14342 Dwarf call frame information contains frame description entries with instructions with the wrong address
CODEGEN-14324 Compiler fails with INTERNAL ERROR: opt2000 experienced a segmentation fault
CODEGEN-14244 The compiler returns a successful exit code to the OS despite missing cmd options file
CODEGEN-13483 Right shift of int40_t value converted from float causes compiler to fail with INTERNAL ERROR: no match for SRL
CODEGEN-13376 switch statement case with unsigned short C++ scoped enum is incorrect
CODEGEN-13324 symbol table entry for the compiled file should indicate source file name but instead has either a temp file name or the file's assembly file name
CODEGEN-12801 Incorrect value from conditional statement computing a bool
CODEGEN-12762 assignment to a bit field mistakenly overwrites entire bit field structure
CODEGEN-12663 Compiler may generate incorrect code for ternary max idiom with integers
CODEGEN-12282 Missing warning for C89 with integer literal too large for long
CODEGEN-12112 attribute constructor does not support optional priority input but silently accepts it
CODEGEN-11933 Compiler may ignore necessary truncation of signed integers when used in array access
CODEGEN-11931 Brace-initialized nested aggregate zero-init omitted
CODEGEN-11639 Functions with constructor attribute are incorrectly discarded
CODEGEN-11634 Compiler fails with internal error “Bad kind: TYPE::type_pointed_to”
CODEGEN-11523 When using –opt_level=3, for a loop, compiler may emit assignment to member of a struct in the wrong place
CODEGEN-11515 Compiler hangs on compile-time access of non-zero indices
CODEGEN-11514 constexpr template variable should be considered a constant expression
CODEGEN-11328 ELF symbol table entry for uninitialized static variable incorrectly shows size of 0
CODEGEN-11223 Compiler fails with internal error “Bad kind: TYPE::type_pointed_to”
CODEGEN-10993 Inconsistent definition of ATTRIBUTE macro for non-LLVM toolchains
CODEGEN-10691 assembler/linker incorrectly handles REL relocations if user specifies a CODE_SECTION that starts with ‘a’
CODEGEN-10525 Compiler aborts when pointer to member of struct is returned by a function and then the contents are copied.
CODEGEN-10306 For EABI cinit copy “compression”, the linker incorrectly sets the number of bytes to copy for smaller copy initialization sizes
CODEGEN-9407 Flexible array of structs does not correctly initialize last element with implicitly initialized struct members.
CODEGEN-8789 std::is_trivially_destructible<array of non-trivially destructible> should return false
CODEGEN-8578 Contact support message needs updating for E2E changes
CODEGEN-8437 Expression with large numbers optimized incorrectly

Known defects


The following link will lead to an updated list of known defects in this release:

Known defects – dynamic