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/TMS320F28377S: Object file naming with CCS7 and CMake

Part Number: TMS320F28377S

Tool/software: Code Composer Studio

I am trying to generate the same output when building my project with CCS7 and with CMake. The last remaining issue is that there are significant differences in the .map file and linker files due to how the different tools handle object files.

In CCS, the souce file myfile.c would generate the object file myfile.obj. In CMake the source file myfile.c would generate the object file myfile.c.obj. Is there a way in CCS to change the object files so that they match the CMake style output?

My project also has .asm files so using the '--object_extension .c.obj' doesn't work properly for the .asm files (as they should be .asm.obj).

  • Scott,

    It took a bit of playing around but I think I have a solution for you:

    Below you can see how I used a build variable that represents the name of the input file and passed that to --output_file and added .obj on the end.

    I believe this does what you want but I have not tried on a .asm file but it should work for that too.

    Regards,

    John

  • John,

    Thanks, that helped some. The good news is that I now have my_c_file.c.obj and my_asm_file.asm.obj.

    The bad news is that I'm now getting linker errors for all the files. Here is a representative error:

    "C:\\Users\\SCOTT~1.BEC\\AppData\\Local\\Temp\\118163", line 41: error #10008-D: cannot find file "./MAIN.obj"

    I suspect that I need to change the Command-line pattern from: 

    ${command} ${flags} ${output_flag} ${output} ${inputs}

    to something else. It looks like the ${inputs} is still passing in my_c_file.obj instead of my_c_file.c.obj.

    Thanks,

    Scott

  • ${inputs} would be a list so that would be hard to override without specifying the full list manually.  I did that here:

    The pain with this would be needing to update it every time you add a file.

    I will check with our build guy to see if there is another way.

    Regards,

    John

  • John,

    You are correct, specifying the files manually works. If you get an answer on how to do this in a more automated way that would be appreciated.

    Thanks,

    Scott