This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
There's a problem with Program Mode Compilation reproducable starting from at least CCSv5 to CCSv7 (checked myself).
If source files are located at the same directory, program mode compilation work, if creating sub-directories, or adding more source directories - it doesn't.
Compilation works normally without 'program mode compilation' option enabled.
Adding source locations to 'paths' in CDT doesn't help.
Note1: I've found the same problem existed in CCSv4.4 and wasn't resolved due to: https://e2e.ti.com/support/development_tools/compiler/f/343/t/98506
Note 2: I cannot share my project, but this bug can be reproduced easilly.
Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.
Having CCS problems? Check out the CCS Troubleshooting Guide
Looking for CCS Training? Check out the CCS Training Site
Curious about the status of a bug and know the tracking ID? Track it via the public bug tracking portal
NOTE: When a bug is filed and a tracking ID is provided, the thread may then be suggested as "TI Thinks Resolved". Why? Please read the first FAQ of the CCS Forum Guidelines & FAQ
Which TI compiler do you use? If it supports --opt_level=4, then I recommend you not use program level optimization and use --opt_level=4 instead. You will get optimization results that are probably even better. And it avoids all the build time problems of program level optimization.
Thanks and regards,
TI C/C++ Compiler Forum ModeratorPlease click This Resolved My Issue on the best reply to your questionThe CCS Youtube Channel has short how-to videosThe Compiler Wiki answers most common questionsTrack an issue with SDOWP. Enter your bug id in the Search box.
In reply to George Mock:
I've tried different compilers with the same results. Currently installed compilers versions are: 7.4.23, 8.1.4, 8.2.1, 8.2.2
I have seen none of them supporting --opt_level=4 in the CCS interface, so I actually didn't even suppose that such level could exist. Is it possible to set it, and for which compilers if yes?
As for generic optimizations, my code has some abstractions like calling functions by pointers. If using simple optimization, compilers spends severall instructions on loading address and jumping, if using 'program mode compilation', it's only one direct jump in most cases.
I have either to exclude abstractions (which makes it harder to support and improve this code), or to use 'program level optimization' now. The program is time critical, so even 5% of speed improvement by above mentioned optimizations are very useful, and allow me using more complex processing.
Does your compilation also fail silently, as in the thread you cited, or is there an error message? I'm wondering exactly what you mean when you say that compilation "doesn't work."
Could you post the console logs from a working and a non-working case?
Program-mode compilation operates essentially by concatenating all the source files on the command line into a single unit. Therefore, I'd expect the log to show something like "cl6x -o -pm a.c b.c c.c d.c". If the problem is only with subfolders, then I wonder if the subdirectory prefixes are missing or the cl6x command is broken into several commands.
In reply to pf:
In reply to Vladislav Vasiliev55:
Vladislav Vasiliev55Currently installed compilers versions are: 7.4.23, 8.1.4, 8.2.1, 8.2.2
I can tell from those version numbers you use the C6000 compiler. As pf points out, this compiler does not support --opt_level=4.
I am unable to reproduce the -pm building problem. I put together a very simple project with CCS v7.3. It has source files in subfolders, and uses -pm. It builds with no problem. It is attached at the end of this post.
Please put together a project which demonstrates the problem. Package it into a zip file as described in the article Project Sharing. Attach that zip file to your next post.
Thanks for your project!
By carefully comparing it with mine, I've discovered that my .cproject file contains file-specific compilation options with custom build settings for some source files:
When 'program mode compilation' is enabled code composer takes into account and compiles only those files and folders with dedicated options, and ignores all others.
I couldn't find a way to remove those custom build options using CCS environment, but text editor helps - manually editing .cproject and removing corresponding options allows to build project.
Thanks a lot for help!
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.