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.

Linker-Problem with migration of CodeComposer-Project from V3.3 to V5.1

Hi all,

I am evaluating Code Composer V5.1 and I came accross the following issue when migrating a sample project from V3.3 to V5.1.

It seems that the build options - especially the link options - do not match and I wonder how I can force them to be the same before and after migrating the project.

 

In detail, I did the following:

i) Build the whole project in CCSV3.3 and generated the corresponding *.out, *.map files

ii) Imported the whole project from CCS3.3 to CCS5.1 and made sure that the same version of CGTs are used for both projects (under V3.3 and V5.1)

iii) build the whole project and compared the resulting *.map-Files. And I came accross the issue, that the result from link processes (the *.map-File) are NOT the same when applying the build process once via CCS3.3 and the second time via CCS5.1

Going into detail, I found out that the ALLOCATION MAP differs between the two proceedings (in other words, the code segments may be the same - but they seem to be placed to different spaces in memory).

iv) to be sure whether it is really a linking problem or rather a compile/assemble problem, I did re-compile/re-assemble the whole project with CCS3.3. Then I forced only the linker to be called from CCS5.1 ... and still the *.map-Files were not the same.

Therefore I am pretty sure that - in detail - the linker options before and after the migration do not match (or that any kind of library included differs)

 

For V5.1, I found a good opportunity to find out  what options were really used during link process - just by reading out the generated build log file (\.metadata\.plugins\org.eclipse.cdt.ui\*.build)

To come further with the issue, I am now dealing with the following problems:

1. Is there an opportunity in CCS3.3 as well to know not only the results of linking process (eg *.map-File) - but also each and every link-/compile-option that was used during build process (as in the *.build file mentioned above)? Just looking at the build window gave me the impression that it is not displaying the whole truth.

If it is possible to send the whole build process options into a file, this would allow me to compare the two link processes and find out the differences if build was started from CCSV3.3 or from CCSV5.1.

2. How do I call the build tools in a cmd-line or bach-file? Is there an opportunity to perform such a batch-file-calling from CCS3.3 and/or CCS5.1.

My idea is to "forget" the "secrets" of CCS for a while and try to call the build tools eg. via command line: the advantage is that I can be 100% sure what options are really used without going throught dozens of options-windows in Code Composer Studio.

In other words: if I manage to call 100% the same tools with 100% the same options via batch script in a first step, I can evaluate how to these options via Code Composer build options dialogs.

 

Thanks for any kind of advice!

 

 

 

 

 

  • Hi Christian,

    Christian Mueller90830 said:
    Therefore I am pretty sure that - in detail - the linker options before and after the migration do not match (or that any kind of library included differs)

    This is something I have seen raised in the past. I was never able to confirm it 100% but I believe the issue is related to differences in the link order. You can explicitly set the link order in both v3 and v5 to match and see if this helps.

    Otherwise I suggest using makefiles. Other customer who have run into the same problem have gone with that option to avoid any inconsistencies. I mention makefile usage in CCS in more detail below.

    Christian Mueller90830 said:

    1. Is there an opportunity in CCS3.3 as well to know not only the results of linking process (eg *.map-File) - but also each and every link-/compile-option that was used during build process (as in the *.build file mentioned above)? Just looking at the build window gave me the impression that it is not displaying the whole truth.

    If it is possible to send the whole build process options into a file, this would allow me to compare the two link processes and find out the differences if build was started from CCSV3.3 or from CCSV5.1.

    There should be a file called "Debug.lkf" in the same folder as the pjt file. This file contains a list of additional linker options passed to the linker from CCS, along with any options you see in the build window

    Christian Mueller90830 said:
    2. How do I call the build tools in a cmd-line or bach-file? Is there an opportunity to perform such a batch-file-calling from CCS3.3 and/or CCS5.1.

    There are utilities to build from the command line for both v3 and v5. What i suspect you want, however, is to use the same tools to do the build since you are trying to have the same exact build environment for both. In that case, I suggest building with makefiles. in CCSv3.3, there is an option to export your project to a makefile (under the projects menu). You can then use a make utility (CCS comes with gmake) to build the makefile. Also, you can open the makefile in a text editor to see all the options used to build. and finally, you can use that same makefile and build it from v5 using a standard makefile project. You can configure your standard makefile project to use the same make utility.

    Thanks

    ki

  • Hello ki,

     

    thanks for your competent reply.

    After some further investigations on the issue, I agree with your advice that building with makefiles might be the best solution to have exact the same build environment for both.

    I tried to export the V3.3 project to a makefile and unfortunately, I came accross some problems. The export seemed to work well, but when trying to build the project with the resulting *.mak-file lead to further problems.

    In other words, the *.mak-File I received was not "plug&play" for a command line build. So I will have to go more into detail with the makefile build issue.

    Remaining questions are:

    1. Are there any simple sample projects to get started with makefile builds? The problem is that the project I am dealing with is too complicated "to get started" with the whole makefile build issue (that I am not experienced with)?

    2. In your posting, you write about creating a "standard makefile project" in CCS V5. I think what you mean by this is: once I will have "solved" the whole makefile issue and will be able to build my project (100% identical) from command line with makefile build - I will have to modify the CCSV5 so that it uses these makefile builds when compiling/linking instead. Is there any helpful documentation on how to manage that for a V5 project? My idea is to configure the project in a way that allows me to start the (external) makefile build process by clicking an appropriate button in the IDE.

     

    Regards

    Christian

  • Christian Mueller90830 said:
    In other words, the *.mak-File I received was not "plug&play" for a command line build. So I will have to go more into detail with the makefile build issue.

    Yes, usually there is some manual tweaking involved to get it right. The export is fairly basic and it doesn't surprise me that additional work is needed when exporting a complex project.

    Christian Mueller90830 said:
    1. Are there any simple sample projects to get started with makefile builds? The problem is that the project I am dealing with is too complicated "to get started" with the whole makefile build issue (that I am not experienced with)?

    makefiles are pretty standard and there is a lot of documentation out there. The gnu documtation is pretty good:

    http://www.gnu.org/software/make/manual/make.html#toc_Introduction

    Most of the examples that come with CCS use CCS projects but there are some software packages from TI (many of the SDKs) that use makefiles. What device are you using?

    Christian Mueller90830 said:
    2. In your posting, you write about creating a "standard makefile project" in CCS V5. I think what you mean by this is: once I will have "solved" the whole makefile issue and will be able to build my project (100% identical) from command line with makefile build - I will have to modify the CCSV5 so that it uses these makefile builds when compiling/linking instead. Is there any helpful documentation on how to manage that for a V5 project? My idea is to configure the project in a way that allows me to start the (external) makefile build process by clicking an appropriate button in the IDE.

    You have a few options. One is to completely take CCS out of the equation for your builds. You would simply call make from the command line on your makefile and build. No CCS involvement. You always use the same build environment. CCS (whether v3 or v5) would just be used for debugging after your executable is created.

    Your other option is to call make on your makefile from inside your CCS environment. basically your project in CCS has a makefile and when you build it, it calls make on the makefile. It's doing the same thing as you would from the command line except you get that GUI interface via clicking that appropriate button in the IDE as you mentioned. There really is no special modification. You would just create a standard C/C++ project instead of a CCS one and select the option to use an existing makefile.

    http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm

    Hope this helps,

    ki