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.

ccsv6 gcc linker error during make

Hi,

I am trying to buld  some >1000 .c  files using GCC in ccsv6, make is generating objects successfully but while linking I get the following error,

**** Build of configuration Debug for project sample_project ****

"C:\\ti\\ccsv6\\ccsv6\\utils\\bin\\gmake" -k all
'Building target: sample_project.out'
'Invoking: GNU Linker'
'Flags: -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16 -g -gstrict-dwarf -Wl,-Map,"sample_project.map" -nostartfiles -march=armv7-r -mbig-endian -mfloat-abi=hard -mfpu=vfpv3-d16 -g -gstrict-dwarf -Wall'
"C:/ti/ccsv6/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc.exe" -@"ccsLinker.opt" -o"sample_project.out"
arm-none-eabi-gcc.exe: error: unrecognized command line option '-@ccsLinker.opt'
arm-none-eabi-gcc.exe: fatal error: no input files
compilation terminated.
gmake: *** [sample_project.out] Error 1
gmake: Target `all' not remade because of errors.

Any feedback is highly appreciated.

  • According to the GNU Linker documentation, the option accepted by the linker is "@file" to tell it to read command-line options from file. I suspect that since you have a large number of input object files getting passed to the linker, that they are being passed via the ccsLinker.opt file. Is this file generated in your project folder?

    Can you try modifying the command to remove the "-" prior to @"ccsLinker.opt" and see if that helps? This is only a guess at the moment, as I curently don't have a test project with a large number of source files that would be forced to generate a ccsLinker.opt file.

  • Hi,

    Yes the ccsLinker.opt is generated in the project folder.

    I tried by removing '-' before @ccsLinker.opt but I get the following error,

    'Building target: sample_project.out'
    'Invoking: GNU Linker'
    'Flags: -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16 -g -gstrict-dwarf -w -Wl,-Map," sample_project.map" -nostartfiles -march=armv7-r -mbig-endian -mfloat-abi=hard -mfpu=vfpv3-d16 -g -gstrict-dwarf -Wall'
    "C:/ti/ccsv6/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc.exe" @"ccsLinker.opt" -o"sample_project.out"
    c:/ti/ccsv6/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe:../CC_code/benchmark.lds:101: syntax error
    collect2.exe: error: ld returned 1 exit status
    gmake: *** [ sample_project.out] Error 1
    gmake: Target `all' not remade because of errors.

    I had to modify the makefile in workspace debug folder and build the project from command line using "gmake -k all" this is because the makefile is re-generated in IDE hence removing '-' doesnt help in IDE.

    is there any solution to resolve this linking issue?
  • Not sure, but this may help .

  • srikanth hungund said:
    "C:/ti/ccsv6/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/arm-none-eabi-gcc.exe" @"ccsLinker.opt" -o"sample_project.out"
    c:/ti/ccsv6/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/bin/ld.exe:../CC_code/benchmark.lds:101: syntax error

    This seems to indicate a syntax error in the benchmark.lds file. Can you take a closer look near line 101 in that file and see if there might be a syntax error there?