C28x Compiler Error and Warning Messages

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

Often it is helpful to know what errors and warnings can be generated as well as the source of common errors. This article includes a list of the error, warning and remark messages generated as well as a list of common errors and their resolution.

Possible Errors, Warnings and Remarks

The following file lists the error/warning/remark messages generated by the Texas Instruments C/C++ parser. The purpose of this list to provide some indication as to which error/warning id # corresponds to which error/warning message.

Common Errors and Warnings

Warning: build attribute vendor section TI missing in "<library or object> : compatibility cannot be determined

The library was built with an older tool set than the application it is being linked into. Older tools did not define this attribution. Build attributes have existed for quite sometime so this warning is the exception. Previously the tools interpreted files with no build attributes as having 0 values, but this is incorrect. They are now treated as compatible with everything, but warn the user that they are on their own.
Examples:
  • The IQmath Library which is built with an older compiler but is compatible with current compilers.
  • Flash API which is built with older compilers due to testing.
  • SFO library used for the HRPWM module.
NOTE: To suppress the warning you can use the linker option --diag_suppress=16002 which can be placed in the linker command file

fatal error: file .....rts2800_fpu32.lib<boot.obj>" specifies ISA revision "C28FPU32", which is not compatible with ISA revision "C2800" specified in a previous file or on the command line

This is an attempt to link source compiled with --float_support=FPU32 with a non-FPU32 object file. In this case the RTS library was built with --float_support=fpu32. This could, instead, be another library or a project source file.
  • Check each library and make sure each was built with the -v28 --float_support=FPU32 switch.
  • Make sure all .c files are compiled using the -v28 --float_support=FPU32 switch. (In Code Composer Studio you can set this as a global build option or a per-file build option).
If the project is not for a device with the C28x+FPU unit, then the RTS library should be changed to the non FPU32 version. See C28x Code Generation Tips and Tricks Wiki Article for information on the runtime support library.
The two can not be linked because the calling conventions for float are different. If it is a fixed-point device then “float” numbers are passed on the stack. If it is a 28x+FPU device, then “float” is passed in FPU registers.

Warning: entry-point symbol other than "_c_int00" specified: "code_start"

This warning is fine and can be ignored. It is just telling you that the entry point for the program is set to code_start instead of the default _c_int00 which is what we need in these examples. Other Peripheral Examples provided by TI will also generate this warning.

Error: unresolved symbols remain....

It means somewhere in the source the symbol has been used, but the linker is unable to find where it is created. For example, if your code had the statement c = IQdiv(a,b); but the IQmath library has not been included in the project, the symbol IQdiv will be flagged as undefined.
Symbols that include $$ in them (for example: FD$$MPY or FD$$TOL) likely come from the runtime support library. See C28x Code Generation Tips and Tricks Wiki Article for information on the runtime support library.

Error: Tag_ISA attribute value of "2" that is different than one previously seen ("1"); combining incompatible files

The tools are complaining about mismatched values of "Tag_ISA", which means there are mismatched ISA versions. "1" is C27x, and "2" is C28x, so this test case is mixing C27x and C28x object files. A future release of codegen will use "C2700" and "C2800" instead of "1" and "2" in the error message.
Make sure all files are compiled with -v28 to avoid this error.

Error: Tag_Memory_Model attribute value of "1" that is different than one previously seen ("2"); combining incompatible files

Some files or libraries have been compiled using a small memory model and others with a large memory model. The linker will not allow you to combine files linked with different memory models.
For C2000, large memory model (-ml compiler switch) is recommended and used in examples provided by TI.

Error: placement fails for object "csmpasswds"

This is an issue in an early version of the 5.x compiler/linker. The linker is complaining about a section with the same name on page 0 and page 1. You can change the name of one of these sections in the liker .cmd file. The suggested fix, however, is to update the codegen tools.

Warning: function declared implicitly

This is not a warning to ignore. It means a function doesn't have a prototype and the compiler has made some assumptions about the values you are passing/returning. That can quickly lead to a bug. Fix this warning!

Error: placement fails for object

This is a linker error that means the object will not fit into memory. This can be due to data page blocking. Refer to C28x Compiler: Understanding Linking Wiki article for more information.

Error: placement fails for object ".text

This is a linker error that means not enough memory was available to allocate code. Refer to C28x Compiler: Understanding Linking Wiki article for more information.

extern cregister volatile unsigned int IFR; "../include/DSP2802x_Device.h", line 51: error: omission of explicit type is nonstandard ("int" assumed)

MISRA rules require that you build in strict ANSI mode. This means it is an error to use any feature not specified in the ANSI standard. In your case, these features are the keywords cregister and interrupt. The net effect is you cannot use interrupt and cregister and, at the same time, conform to MISRA.
The fix is to instead use alternate keyword, __cregister, or __interrupt, or __asm( ), if you are writing code for strict ANSI/ISO mode (using the --strict_ansi compiler option).

typedef interrupt void(*PINT)(void); "..\include\DSP2802x_PieVect.h", line 26: error: omission of explicit type is nonstandard ("int" assumed)

MISRA rules require that you build in strict ANSI mode. This means it is an error to use any feature not specified in the ANSI standard. In your case, these features are the keywords cregister and interrupt. The net effect is you cannot use interrupt and cregister and, at the same time, conform to MISRA.
The fix is to instead use alternate keyword, __cregister, or __interrupt, or __asm( ), if you are writing code for strict ANSI/ISO mode (using the --strict_ansi compiler option).