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.

Code Composer Studio V6 linker errors

I've had this problem for some time now and revisited it from time to time.  I've seen several posts here with similar issues and none with any workable solution besides replies saying "it should work...".

Basically, I want to upgrade to Code Composer V6, but I cannot port any of my projects from V5.3 successfully.  All of them fail a build saying the linker cannot find the Flash API .lib files.  I've tried a number of different compiler/linker options but nothing works.  Here is a screenshot of my linker settings and linker errors:

  • Hi Ben,

    Your query seems similar to these threads :

    Both of them didn't receive any solutions. I'll link in the respective persons to handle your query.

    can you have a look?

    Regards,

    Gautam

  • Benjamin Paik said:
    Basically, I want to upgrade to Code Composer V6, but I cannot port any of my projects from V5.3 successfully.  All of them fail a build saying the linker cannot find the Flash API .lib files.

    Did you import the CCSv5 project into CCSv6, and then the build started to fail? I see that the library is in your project root directory, is that correct? Could you attach the full output of the CCS build console (generate the log as shown here) as well as the linker command file that is part of your project for us to take a look at?

  • Hi Benjamin,

    Did you try this?

    Under Build -> Link Order

    Add the files to link with.

    Roger

  • Did you import the CCSv5 project into CCSv6, and then the build started to fail? - Yes, the project builds without errors in CCSv5.3.  I import the project as is to CCSv6, and build fails.  Here is a copy of the console log:

    console_log.txt
    **** Build of configuration Release for project KC46Board ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building target: KC46Board.out'
    'Invoking: C2000 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.2/bin/cl2000" -v28 -ml -mt -O3 --advice:performance=all -g --define="LARGE_MODEL" --quiet --diag_warning=225 --obj_directory="C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release" -z -m"KC46Board.map" --stack_size=0x400 --warn_sections -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.2/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_6.4.2/include" -i"C:/Users/bpaik/workspace_v6_1/KC46Board" --reread_libs --xml_link_info="KC46Board_linkInfo.xml" --rom_model -o "KC46Board.out" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_CSMPasswords.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_CodeStartBranch.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_DefaultIsr.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_GlobalVariableDefs.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_PieCtrl.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_PieVect.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/DSP281x_usDelay.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/adc.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/arinc429.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/debug.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/main.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/misc.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/pid.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/pwm.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/resolver.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/tms320f2811.obj" "C:/tidcs/c28/DSP281x/v120/DSP281x_examples_ccsv4/cpu_timer/Release/watchdog.obj" "../DSP281x_Headers_nonBIOS.cmd" "../F2812.cmd" "../Flash2811_API_V210.lib"  -l"C:\Users\bpaik\workspace_v6_1\KC46Board\Flash2811_API_V210.lib" 
    "../F2812.cmd", line 121: error: cannot find file "Flash2811_API_V210.lib"
    "../F2812.cmd", line 122: error: cannot find file "Flash2811_API_V210.lib"
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Erase.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_EraseSector.obj>": compatibility cannot
       be determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Globals.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Init.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Internals.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Prog.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Prog_Pulse.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Verify.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_ClearSector.obj>": compatibility cannot
       be determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_CompactSector.obj>": compatibility cannot
       be determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Delay.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_DisInt.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Erase_Pulse.obj>": compatibility cannot
       be determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_ClearLoop.obj>": compatibility cannot be
       determined
    warning: build attribute vendor section TI missing in
       "../Flash2811_API_V210.lib<Flash28_Compact_Pulse.obj>": compatibility cannot
       be determined
    error: errors encountered during linking; "KC46Board.out" not built
    gmake: *** [KC46Board.out] Error 1
    gmake: Target `all' not remade because of errors.
    
    >> Compilation failure
    
    **** Build Finished ****
    

  • Thanks Roger, your suggestion worked. Strange though that this was not necessary in V5. Also, I assumed having the "Search libraries in priority order" selected in "File Search Path" settings should have had this covered (unless this doesn't mean what I think it does).
  • Yes this is really strange, I do not know why it does not work if we configure it like you did. Our projects did not link too after update (they broke from 5.4 to 5.5 or newer).
  • Benjamin,

    I am glad you resolved the issue by specifying the link order.

    Just to explain a bit about what appears to be happening, your build console shows the file F2812.cmd (linker command file) being passed to the linker before Flash2811_API_V210.lib. I suspect F2812.cmd has some reference to Flash2811_API_V210.lib but the path to the library is not known, hence the errors about not being able to find the .lib file.  

    I believe the error can be resolved in one of the following ways:
    - modify the reference to the .lib in F2812.cmd to contain the full path to the library
    - add the lib to the Build->Link Order to force the lib to appear before the .cmd file in the link order (which is what you already did)
    - add the path to the lib to the Linker->File Search Path, --search_path option so the search path is already known when it is seen in F2812.cmd