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.

CCS/TM4C129ENCPDT: Bug in CCSv7? Linker Command File field goes blank in Project Properties -> General

Part Number: TM4C129ENCPDT


Tool/software: Code Composer Studio

Under Project Properties -> General, the field for Linker Command File goes blank inexplicably.

We are using CCSv7 version 7.1.0.00016 with both TI and GNU Compilers to code for TM4C series MCUs. The project was originally created for TI compiler. Subsequently we followed the instructions here: processors.wiki.ti.com/.../Using_GCC_with_Tiva_in_CCSv6 to add a build configuration for GNU GCC (Linaro). The compiler versions are: ti-cgt-arm_16.9.3.LTS and gcc-arm-none-eabi-4_9-2015q3.

Our projects are checked into a version control system following the advice here: processors.wiki.ti.com/.../Source_control_with_CCS namely that we checked in .ccsproject, .cproject, .project, the .settings folder, and we did NOT check in the following: \Debug or \Release or other build artifact folders, .config, or .launches folders. We did not check in the targetConfigs folder either because we are using "Manage the project's target configuration automatically" and on examination of the files therein it appears they have nothing to do with the build process. We also followed the advice here: processors.wiki.ti.com/.../Portable_Projects to make the project portable, as multiple users on multiple computers may check the project out of version control and work on it. One other thing we did was to copy the tm4c129encpdt.lds file (this is the GNU linker command file) into the project directory, to maintain consistency, as the tm4c129encpdt.cmd (TI linker command file) is in the project directory. We renamed tm4c129encpdt.lds to tm4c129encpdt_gcc.lds for consistency with the tm4c129encpdt_startup_css_gcc.c file that was created when the GNU build configuration was added. We set this name in Project Properties -> General, in the field for Linker Command File. After testing that building succeeded, we committed the project state to version control.

To test that the project is, in fact, portable, we checked it out to a fresh directory and subsequently imported it into a new CCS workspace. When we examined the settings to make sure that nothing was lost, we noticed that the above mentioned field for Linker Command File (under Project Properties -> General) is now blank. Strangely, the build seems to succeed anyway, and the linker command references this file:

'Invoking: GNU Linker'
"C:/ti/ccsv7/tools/compiler/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc.exe" -DPART_TM4C129ENCPDT -DTARGET_IS_TM4C129_RA0 -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -MD -std=c99 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,-Map,"Master.map" --entry _start -L"C:/ti/TivaWare_C_Series-2.1.4.178/driverlib/gcc" -o"Master.out" "./main.o" "./tm4c129encpdt_startup_ccs_gcc.o" -Wl,-T"../tm4c129encpdt_gcc.lds" -Wl,--start-group -lc -lgcc -lnosys -ldriver -Wl,--end-group
'Finished building target: Master.out'

We are concerned that this may be a bug. Also we are concerned that altering any other setting in Project Properties and applying the changes would apply the now-incorrect contents of this field and lose the linker command file setting.

It is of the utmost importance that project state is preserved when committing and checking out of version control, and that no project settings that affect the build are lost.

  • twelve12pm said:
    One other thing we did was to copy the tm4c129encpdt.lds file (this is the GNU linker command file) into the project directory, to maintain consistency, as the tm4c129encpdt.cmd (TI linker command file) is in the project directory. We renamed tm4c129encpdt.lds to tm4c129encpdt_gcc.lds for consistency with the tm4c129encpdt_startup_css_gcc.c file that was created when the GNU build configuration was added. We set this name in Project Properties -> General, in the field for Linker Command File.

    I recreated a similar environment and I believe the intention of the Linker Command File field is slightly different than how you seem to be using it. For instance, when creating a new project you can use the Linker Command File field to select a specific linker command file from a list of files that CCS provides. When you do that, that file will be copied over into the project directory for the project to use. You can also set the field to <automatic> in which case CCS picks the appropriate linker command file to copy over based on the device selection.

    However that field is not intended to specify the name of a custom linker command file that may already be present in the project directory. If I rename a linker command file that is in the project directory and add it to the "Linker Command File" field, click ok and go back into Project Properties, the field is empty. So this behavior occurs even without check in/check out of version control. Adding the file to that field is not necessary as any file that is within the project directory is automatically assumed to be part of the build and so will be passed to the linker anyway. So as long as the linker command file is in the project directory it will be picked up for the build even if it is not specified in the Linker Command File field. 

  • AartiG, thank you very much for your reply.

    I think I see what you mean. The user interface could benefit from improvement. Rather than presenting this as a field that appears to hold a persistent setting, it would be helpful if it were something different, like a button that you would click to do a one-time import. Then you would either explicitly select a linker file or tell it to choose one for you automatically. This would be much more clear from a user standpoint.

    To follow up on this question, since this field is not what we thought it was, where is the persistent setting that tells CCS which linker file to use?

    Thanks again for your help.
  • twelve12pm said:
    The user interface could benefit from improvement.

    I will pass this feedback to the development team and see if there is anything that could be done to improve the user interface here.

    twelve12pm said:
    To follow up on this question, since this field is not what we thought it was, where is the persistent setting that tells CCS which linker file to use?

    There are a couple different ways to tell CCS which linker file to use:
    - any file with .cmd extension that is part of the project (whether is is added or linked to project) will be considered part of the build (unless it is explicitly "excluded from build").  
    - the linker cmd file can be specified in the Linker Options->File Search Path->--library option, and the path to it specified in the --search_path option.

  • Thank you for your answers and for passing our user feedback to the development team. We appreciate that very much.