Readme for MSP430 Code Generation Tools v20.12.0.STS
Table of Contents
Short-term Support Release
The MSP430 CGT v20.12.0.STS release is a short term support (STS) release. This release will be supported only until the next STS or LTS release.
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. The “Development Tools” forum can be found at:
http://e2e.ti.com/support/tools
Defect Tracking Database
Compiler defect reports can be tracked at the Development Tools bug database at:
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
- BIC instruction optimization: The compiler now optimizes below expression to a single BIC instruction:
dst &= ~src to BIC instruction.
The improvement has now been extended for below case with multiple occurrences:
extern unsigned char src, dst0, dst1;
The compiler now generates below for --opt_level=off,0-4:
void func(void)
{
dst0 &= ~src;
dst1 &= ~src;
}BIC.B &src+0,&dst0+0
BIC.B &src+0,&dst1+0
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 STS 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 v20.12.0.STS:
| ID | Summary |
|---|---|
| CODEGEN-7931 | Compiler handles void pointer math inconsistently |
Known defects
Known defects in v20.12.x.STS:
| ID | Summary |
|---|---|
| CODEGEN-8213 | mklib build fails when CCS is installed in a path with whitespaces |
| CODEGEN-8100 | Compiler does not account for wraparound when different increment type added to signed int |
| CODEGEN-6509 | Compiler error: no instance of function template matches the argument list |
| CODEGEN-6070 | Erroneous “redeclared with incompatible type” involving two tagless structs with same form |
| CODEGEN-4329 | Initializing unordered_map with an initializer_list fails with -o2 or higher |
| CODEGEN-4323 | 1 ULP rounding error in double addition |
| CODEGEN-4318 | libcxx/include/random uses unsigned for unsigned long |
| CODEGEN-4305 | Compiler aborts with excessive inlining of C++ functions |
| CODEGEN-4297 | Cannot take the address of std::ctype<char>::table_size |
| CODEGEN-4281 | Unexpected type returned by bitset [] operator |
| CODEGEN-4276 | std::multimap::clear is not noexcept |
| CODEGEN-4275 | std::num_get does not parse floating-point strings correctly |
| CODEGEN-4259 | noexcept(typeid(d)) runtime fail on polymorphic class type |
| CODEGEN-4258 | deeply nested lambda functions hang the codegen |
| CODEGEN-4248 | armcl allows non-default arguments to be specified after default arguments |
| CODEGEN-4247 | Internal error when assigning default arguments to a parameter pack |
| CODEGEN-4245 | Multiple non-variables may be declared using auto or decltype(auto) |
| CODEGEN-4234 | No error generated for lambda-expression in default argument cannot capture any entity. |
| CODEGEN-4158 | TI compiler does not emit clang error: constexpr function never produces a constant expression |
| CODEGEN-4157 | error with using constexpr for return from end() with empty std::initializer_list |
| CODEGEN-4132 | cannot find matching “==” operator definition |
| CODEGEN-4124 | Failure to defer access control checks |
| CODEGEN-4122 | decltype cannot be used as a destructor name |
| CODEGEN-4119 | user-supplied allocator function is not called |
| CODEGEN-4099 | Composing operations for valarray may fail to compile |
| CODEGEN-4090 | Unimplemented core issue 475: std::uncaught_exception is not true when constructing the thrown object |
| CODEGEN-4087 | wostringstream::fill(WCHAR_MAX) incorrectly sets the fill value to ' 'L. |
| CODEGEN-4076 | Exception propagating out of noexcept function does not call std::terminate |
| CODEGEN-4072 | Unimplemented core issue 1769: Catching a thrown derived class by reference to base clas |
| CODEGEN-4071 | <regex> never throws error_ctype |
| CODEGEN-4069 | std::linear_congruential_engine doesn't support 8-bit results |
| CODEGEN-4044 | libcxx istreambuf_iterator points to end of string instead of character past match |
| CODEGEN-4035 | Compiler allows constant subtraction between pointers to different objects |
| CODEGEN-4026 | Non-standard partial ordering of variadic template partial specialization |
| CODEGEN-4002 | Undefined behavior on lambda capturing constexpr by reference |
| CODEGEN-4001 | Unimplemented core issue 588: Unqualified name lookup examines dependent base class |
| CODEGEN-4000 | Core 1601: Overload resolution for enum with fixed type |
| CODEGEN-3999 | Unimplemented core issue 1374: Conversion sequence ranks qualification before reference binding |
| CODEGEN-3998 | Unimplemented core issue 1951: cv-qualified void and scalar types are not literal types |
| CODEGEN-3993 | Constant initialiation may take place before dynamic initialization |
| CODEGEN-3966 | slice_array assignment failures |
| CODEGEN-3965 | Invalid conversion on static_cast from T1 to rvalue reference of T2 |
| CODEGEN-3964 | Unimplemented core issue 1467: Overloads and initializations with single-element initializer_list |
| CODEGEN-3963 | Unimplemented core issue 591: Name lookup in dependent base class that is also the current instantiation |
| CODEGEN-3962 | Core Issue 1804 unimplemented: friend declaration does not apply to class template specializations |
| CODEGEN-3961 | Pack expansion in template parameter list fails |
| CODEGEN-3951 | Spurious error on bypassing initialization of trivially constructible objects |
| CODEGEN-3948 | Spurious syntax error on alignas in alias declaration |
| CODEGEN-3947 | Spurious error on unevaluated use of undefined constexpr function |
| CODEGEN-3946 | Spurious error on global qualifier of struct template |
| CODEGEN-1476 | Incorrect value assigned to a forward reference of a symbol defined in terms of the section's PC ($) after jump expansion |
| CODEGEN-1295 | MSP430 RTS rint() double routines failing for some inputs |
| CODEGEN-1138 | Print a more friendly message when using a lnk.cmd with too large memory |
| CODEGEN-733 | msp C++ cpp compiled with printf_support=minimal causes cout to output incorrect results |
| CODEGEN-633 | Floating point addition rounding error |
| CODEGEN-582 | MSP430 RTS float arithmetic functions do not round correctly |
| CODEGEN-580 | C2000 RTS float arithmetic functions do not round correctly |
| CODEGEN-501 | Compiler emits bogus DW_OP_reg16 for split argument |
| CODEGEN-322 | Structure is not initialized correctly when using -o2 or -o3 optimization |
| CODEGEN-274 | Relocation overflows for BIT instruction using 20-bit pointer |
| CODEGEN-270 | Should forbid non-const objects larger than 64k in large model if –near_data=globals |
| CODEGEN-104 | Linker gives misleading warning when dot expressions used in SECTION directive for .stack section |
| CODEGEN-63 | DWARF does not correctly represent variables stored in register pairs |
| CODEGEN-62 | pow(2,x) has fairly significant rounding error |
| CODEGEN-60 | printf gives wrong value for pointer when its value is incremented |
| CODEGEN-56 | Forward reference in .space generates an internal error |
| CODEGEN-30 | Compilers on PC will not work without TMP set |