C2000 C/C++ Code Generation Tools v20.2.3.LTS Release Notes

Table of Contents


Long-term Support Release


The C2000 CGT v20.2.0.LTS release is a long term support (LTS) release. This release will be supported for roughly 2 years with periodic bug fix updates.


Compiler Downloads and Documentation


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

https://www.ti.com/tool/C2000-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:

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


New Features:



Integer Division Unit (HWINTDIV) updates


The Integer Division Unit feature support has below updates. Feature enabled with --idiv_support=idiv0 and requires --abi=eabi and --float_support=fpu32/fpu64.


Support inline memcpy operations larger than 255 words


Inlining of memcpy for operations less than or equal 255 words is already supported with use of the instruction: RPT #imm

Support has been added for inlining memcpy of operations larger than 255 words by using the RPT instruction with register operand.

Both memcpy inlining uses of RPT can be disabled with --rpt_threshold


FPU64 Run Time Support (RTS) library routine updates



New diagnostic checks



Hex utility --cmac option, supported added for --boot tables


The hex conversion utility’s Cipher-based Message Authentication Protocol (CMAC) feature now supports boot tables with CMAC tags.

To enable, use --cmac=key_file with --boot along with other required boot table options. The CMAC algorithm assumes a fill value of 1’s for gaps between boot table regions which requires setting --fill.


Hex utility --cmac option (cipher-based message authentication protocol)


The hex conversion utility supports the secure flash boot capability provided by TMS320F2838x devices, which have both C28 and ARM cores. The secure flash boot applies the Cipher-based Message Authentication Protocol (CMAC) algorithm to verify CMAC tags for regions of allocated memory.

In order to apply the CMAC algorithm to the appropriate regions in allocated memory, use the hex conversion utility as follows: --cmac=file where file contains a 128-bit hex CMAC key

NOTE: above additionally requires --image or --load_image options.

CMAC tag locations need to be defined in the user’s C code using below symbols along with LOCATION and RETAIN pragmas: secure boot regions: cmac_sb_1 cmac_sb_2 cmac_sb_3 or cmac_sb_4 user-specified region: cmac_all

The hex utility will then apply the CMAC algorithm to all the CMAC tags defined in the user’s C code.

See TMS320C28x Assembly Language Tools User Guide for details.


VCU register save/restore support for interrupt service routines


In prior releases, interrupt service routines (ISR) did not save/restore VCU registers.

Below new option generates VCU register save/restore to stack for ISR’s so vcu code can be re-entrant. If an ISR interrupts a VCU computation then it will not impact results.

 --isr_save_vcu_regs=on,off 

NOTE: VCU save/restore are only emitted for ISR’s that call other functions since leaf ISR routines will not have any VCU register usage as there is no current VCU code generation aside from below save/restore.

For --vcu_support=vcu0/vcu2, below are added to ISR’s:

 VMOV32 SP++,VCRC 
VMOV32
SP++,VSTATUS

VMOV32 VSTATUS,–SP
VMOV32 VCRC,
–SP

For --vcu_support=vcrc, below are added to ISR’s:

 VMOV32 SP++,VCRC 
VMOV32
SP++,VSTATUS
VMOV32 SP++,VCRCPOLY
VMOV32
SP++,VCRCSIZE

VMOV32 VCRCSIZE,–SP
VMOV32 VCRCPOLY,
–SP
VMOV32 VSTATUS,–SP
VMOV32 VCRC,
–SP


Default file extension for compiler generated object files


The default file extensions for object files created by the compiler have changed in order to prevent conflicts when C and C++ files have the same names. Object files generated from C source files have the .c.obj extension. Object files generated from C++ source files have the .cpp.obj extension.


Resolved defects


Resolved defects in v20.2.3.LTS:

ID Summary
CODEGEN-8201 C2000 MOVD32 instruction tries to simultaneously access two memory locations across DP boundary
CODEGEN-8200 Hex utility default map omits ECC address ranges
CODEGEN-8154 The <strings.h> functions aren't declared extern “C”
CODEGEN-8105 RTS function add_device should take const char * as first parameter
CODEGEN-8097 C2000 compiler does not save unused save-on-call RXL registers in interrupt routines with function calls
CODEGEN-8073 Linking with more than 0xffff sections can result in a corrupt executable
CODEGEN-7957 Linker mishandles REL22 relocation in ELF when the addend is non-zero
CODEGEN-7948 TDEH EXIDX binary search helper reads past the end of EXIDX
CODEGEN-7931 Compiler handles void pointer math inconsistently
CODEGEN-7802 CLA compiler schedules read too early after MMOVD32 data-copy-write
CODEGEN-7796 Volatile packed bit-field should be read as packed type, not declared type

Known defects


Known defects in v20.2.x.LTS:

ID Summary
CODEGEN-8265 Combining #pragma SET_DATA_SECTION and –gen_data_subsections=on fails to put arrays into subsections
CODEGEN-8214 Rounding error in floating point division of constant values
CODEGEN-8175 C2000 compiler guide erroneously says with –fp_mode=relaxed option, doubles will be replaced with integers instead of floats
CODEGEN-8116 Documentation for hex2000 does not explain several boot table options
CODEGEN-7444 Linker internal error when crc_table is applied to EXIDX
CODEGEN-7388 The option –preproc_dependency mishandles spaces in directory names
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-5179 When a symbol is remapped, DW_TAG_TI_branch/DW_AT_name is not updated
CODEGEN-5078 Simple syntax error causes assembler to fail with INTERNAL ERROR
CODEGEN-4985 Typo on ULP Advisor message
CODEGEN-4960 Using –gen_profile_info with code with CLA source fails to build
CODEGEN-4943 MISRA 12.2 is incorrectly issued when one variable is used multiple times as an array index in the same expression
CODEGEN-4934 Incorrect issue MISRA diagnostic 10.5: If the bitwise operators ~ and << are applied
CODEGEN-4789 Compiler incorrectly issues MISRA diagnostic 12.7 Bitwise operators shall not be applied to operands whose underlying type is signed
CODEGEN-4712 No MISRA 10.1 and 10.6 diagnostics issued on initializations
CODEGEN-4617 Compiler incorrectly issues MISRA 12.6 diagnostic: Expressions that are effectively Boolean should not be used
CODEGEN-4346 MISRA 19.4 error fails to identify itself as MISRA diagnostic when problem is on the command line
CODEGEN-4342 cerr.tie() returns the wrong value
CODEGEN-4298 Internal error when passing a temporary array of objects
CODEGEN-4297 Cannot take the address of std::ctype<char>::table_size
CODEGEN-4296 Undefined symbol isblank with -g or -ooff
CODEGEN-4290 wstring runtime failure - likely bug in swprintf
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-4250 regex_constants::ECMAScript not expected to be 0
CODEGEN-1031 C2000 float software multiply doesn't handle -1*INF properly
CODEGEN-1028 C2000 can't print 0 with %a format
CODEGEN-793 Ill advised enum scalar usage gets MISRA diagnostic, but similar usage of enum array does not
CODEGEN-792 Array that is correctly initialized erroneously gets a MISRA diagnostic about size not being specified
CODEGEN-580 C2000 RTS float arithmetic functions do not round correctly
CODEGEN-322 Structure is not initialized correctly when using -o2 or -o3 optimization
CODEGEN-104 Linker gives misleading warning when dot expressions used in SECTION directive for .stack section
CODEGEN-88 strcmp doesn't correctly handle values with uppermost bit set
CODEGEN-71 Extern inline functions are not supported in the C/C++ Compiler with COFF ABI
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