Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
Before asking for CGT support
This page is intended to guide you through the support options and help debugging Code Generation Tools (compiler/assembler/linker) issues
Was your question already answered in one of the external resources?
- Check if you are using the latest version of the tools. Some problems with the tooling have been already addressed, please see release notes in CCSv3 Update Advisor at "my.TI". (a valid account is needed for access)
- Check the Code Generation Tools FAQ for general questions
- Several articles that cover specific usage scenarios are published in the
- For productivity tips check the presentation at the page CGT Tips and Tricks for Beginners
- New features and bug information can be found in the <readme.1st> file supplied with each new tool release. For the newer tool releases also check <LINKER_README.txt>
- Check the SDOWP online bug database!
Compiler User Guides
- The Compiler User's Guide for each family contains information about the runtime libraries, C/C++ features and limitations, machine-dependent characteristics, etc.
- MSP430 C/C++ Optimizing Compiler User's Guide (latest version) (pdf)
- MSP430 GCC User's Guide (latest version)
- C28x C/C++ Optimizing Compiler User's Guide (latest version) (pdf)
- C55x C/C++ Optimizing Compiler User's Guide (latest version)
- C6000 C/C++ Optimizing Compiler v8.x User's Guide (pdf)
- ARM C/C++ Optimizing Compiler User's Guide (latest version) (pdf)
- PRU C/C++ Optimizing Compiler User's Guide (latest version)
- The Assembly Language Tools Guide for each family contains usage information about the tools: assembler, compiler, linker, hex conversion utilities, library archiver, object file utilities.
- MSP430 Assembly Language Tools User's Guide (latest version) (pdf)
- C28x Assembly Language Tools User's Guide (latest version) (pdf)
- C55x Assembly Language Tools User's Guide (latest version)
- C6000 Assembly Language Tools v8.x User's Guide (pdf)
- ARM Assembly Language Tools User's Guide (latest version) (pdf)
- PRU Assembly Language Tools User's Guide (latest version)
A useful cleanup check:
- Check carefully the error message:
- Compiler errors are usually self-explanatory and easy to pinpoint the root. Useful reading can be found in the section Understanding Diagnostic Messages of the Optimizing Compiler User's Guides.
- Linker error messages are harder to pinpoint by nature. However they usually refer to an object file not being able to find symbols (variables, functions) defined somewhere else in the project - either a library was not included or a function was not properly prototyped using the keyword extern. In other cases a linker command file might not have been included in the project at all.
- Is the runtime library included? This is a common error that is diagnosed by the message symbol _c_int00 not found.
- Are any functions declared implicitly? This is a very common issue that does not produce any compiler errors but usually the code does not run as intended. Check slide 35 of the CGT Tips and Tricks for Beginners
- Make sure you are properly saving and restoring context if changing registers using inline assembly code. It is a common mistake to expect that the compiler will perform this automatically.
- Similarly, if using intrinsics make sure that you know exactly what you are doing. The compiler does not perform any error checking on these situations!
- Be aware to not feel tempted to fall into "standard wars". C/C++ standard leaves several details to be defined each compiler vendor - the so-called "implementation-defined behaviour". Therefore not everything that builds in GCC or other implementations will necessarily build in TI's Code Generation Tools. In other words, the common questions that arrive to the support lines are "Your compiler does not meet the C/C++ standard because this code builds in GCC".
- Along the same lines above, be careful with "undefined behaviour". C/C++ standard also states that several details can lead to undefined results. Therefore if a code shows no runtime errors when built with a specific vendor compiler, it may not be the case for TI's Code Generation Tools.
- If using C++, be advised that its support is more extensive only in the latest Code Generation Tool releases - this is also true for the Standard Template Library availability. Details in the article Overview of C++ Support in TI Compilers.
- Avoid unnecessary use of typecasting, since in practice it tells the compiler to ignore any error-checking on the types used. This can potentially lead to a runtime error if, for example, precision is lost in a calculation or the result of a pointer arithmetic expression jumps to unexpected locations.
- Try to avoid expressions that pack too many operations and operands in the same line. From a compiler/optimizer standpoint the packing usually does not make a difference. Not to mention that chances for undefined or implementation-defined behaviour are high - things like *ptr_a++ = *ptr_b++; or arr[j++] = j;
- When using Code Composer Studio, keep in mind that Code Generation Tools are command-line in nature. Therefore carefully check the Build window in Code Composer Studio for different or strange paths used by the tools - this can potentially indicate errors in include paths, especially after installing a new tool release.
- Make sure any environment variable used by your project points to the correct directory. CCS usually spawns a warning if the project explicitly uses some, however no warning is generated if this variable is used inside a specific source file or the code is being built using the command line tools.
- Sometimes errors can be easily fixed by making sure that all the include and library directories are properly configured in the Compiler and Linker tabs of the Project options, even if the header file is listed in the Code Composer Studio Project tab.
- TI does not provide documentation about the standard C libraries. Several references in the form of internet pages and books have already been published about this subject.
- Similarly, if you are using the C++ STL library and have questions about the API, TI does not provide documentation for that. The file <readme.1st> contains the following references:
- The Standard C++ Library: A Tutorial and Reference, Nicolai M. Josuttis, Addison-Wesley, ISBN 0-201-37926-0
- The C++ Programming Language (Third or Special Editions), Bjarne Stroustrup, Addison-Wesley, ISBN 0-201-88954-4 or ISBN 0-201-70073-5.
- Dinkumware's online reference at http://dinkumware.com/manuals/
- C++ online reference at http://www.cplusplus.com/
- A useful utility for checking C syntax and issues is Lint: http://www.splint.org/
If nothing else works:
Useful information to provide together with a description of the issue:
- Code generation tools version used
- Toolset: Code Composer Studio and DSP/BIOS version (if used)
- Platform and DSP used (simulator? development boards?)
- A reproducible test case - this is a key element to enable the reproducibility of the error and pinpoint its exact root.
- All relevant header files - Use this preprocessing technique to simplify test case creation.
- Either a Code Composer Studio Project or the exact command line options
- A reproducible test case makes the problem 1-2 orders of magnitude easier to diagnose, which means the fix will be that much faster.
- The exact, complete text of the error message. Either cut and paste it into the report or take a screenshot. Please do not paraphrase it.
- If the error only appears at runtime, make sure it can be run in either the simulator on in one of the development boards - similarly as above, this is also a key element to enable pinpoint its exact root.