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.

WARNING: object file specified, but linking not enabled



Hi, 

I see the warning "WARNING: object file specified, but linking not enabled"  during my build, using CCS 4.2.1.   The warning appears for each of my object files.  However, the linker runs without a problem.  Google search shows me that other people have this warning too, based on the snippets they have posted, but I haven't found the reason the warning is occurring. 

Anyone know what causes this, or do you just ignore these warnings?  

Thanks, 

Matt

  • One case that I have seen is when the compilation command is something like "cl6x main.c -o main.o".  The TI compiler's command-line options are not the same as gcc's, or the same as typical Unix compilers'.  Lower-case -o does not mean "output to this file," it means "optimise," and is equivalent to gcc's -O.

    Thus the compilation is specifying both a source file, main.c, and an object file, main.o, but has not specified the -z option that directs it to link.

  • pf said:

    One case that I have seen is when the compilation command is something like "cl6x main.c -o main.o".  The TI compiler's command-line options are not the same as gcc's, or the same as typical Unix compilers'.  Lower-case -o does not mean "output to this file," it means "optimise," and is equivalent to gcc's -O.

    Thus the compilation is specifying both a source file, main.c, and an object file, main.o, but has not specified the -z option that directs it to link.

     

    here is my compile command - I don't see any -o flags, but maybe there is something in here that is a clue: 

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/bin/cl470" -mv7M3 -g -O0 --opt_for_speed=0 --gcc --define=ccs --define=PART_LM3S9B92 --define=TARGET_IS_TEMPEST_RB1 --include_path="C:/StellarisWare" --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/include" --diag_warning=225 -me --gen_func_subsections --abi=eabi --code_state=16 --ual --preproc_with_compile --preproc_dependency="user/Events.pp" --obj_directory="user" "user/Events.obj"  "../user/Events.c"

     

  • user/Events.obj is an object file.  I don't know how it got there, and I'm not enough of a CCS expert to help you find out, but that's the reason for the warning.

  • pf said:

    user/Events.obj is an object file.  I don't know how it got there, and I'm not enough of a CCS expert to help you find out, but that's the reason for the warning.

    pf is right. user/Events.obj is an object file and should not have been passed to the compile command. That is the reason for the warning but I'm not sure how it got in there either. Could you check your project build properties to see if you have set anything specific which is not a default setting (other than optimization etc)?

    Also which specific version of CCS is this?

  • Version is 4.2.1.00004

    Compiler settings:  (I notice that the object files are not included in the "all options" in my settings)

    Command:    "${TMS470_CG_ROOT}/bin/cl470"

    All options:    -mv7M3 -g -O0 --opt_for_speed=0 --gcc --define=ccs --define=PART_LM3S9B92 --define=TARGET_IS_TEMPEST_RB1 --include_path="C:/StellarisWare" --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/include" --diag_warning=225 -me --gen_func_subsections --abi=eabi --code_state=16 --ual

     

    Linker settings: (This doesn't seem to be the problem area, but including for completeness)

    Command: "${TMS470_CG_ROOT}/bin/cl470"

    All options: -z -m"DTPBoard.map" --stack_size=2048 --heap_size=4096 --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/include" --reread_libs --rom_model

     

    Other: 

    Post-build step:  "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd470.exe" "${CG_TOOL_ROOT}/bin/hex470.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

     

    If there is somewhere else I should look for more settings, let me know and I will check it out.  Thanks!

     

  • If you're able to share the project we might be able to figure this out quicker. If you can share the project, please zip up the entire project folder and attach it here. If the project has linked source files from locations that are not within the project folder, please see this article (under Exporting projects) for details on how to share projects:
    http://processors.wiki.ti.com/index.php/Project_Sharing

    If you'd rather send it to me privately than post on this forum, let me know and I will start a private conversation with you.

  • Hallo, Dear All:

    Have you already solved this problem?

    I encounted the same warning.

    I immigrate my project from TI builder to Eclipse makefile builder.

    Everything is OK but this annoy warning.

    Is anybody helpful?