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: CCS file syntax highlighting



Tool/software: Code Composer Studio

Hello,

I would like to tell CCS to use syntax highlighting of a chosen language for some file with a non standard file extension.

specifically i have a linker command file whose extension is not and should not be .cmd and i want CCS to use the linker files syntax highlighting on it.

So far i have found that under preferences -> fileTypes i can assign a new extension and tell CCS what file type it is. this worked but also has a huge caveat for me - it also cause CCS  treat the file as linker file from all other perspectives meaning it tries to add this file to the total linker script which is not what intended and of course causes errors .

Is there a way to configure only the syntax highlighting for some file type? also can i modify the syntax (colors,...)

Thanks

Guy

  • Guy,

    So the scenario is:

    • You have linker command files with an extension other than .cmd (lets call it .guy)
    • You want these to have syntax highlighting support
    • You don't want these to automatically be passed to the linker.  I am assuming that they are passed to the linker in some other way (build options, included from another linker command file...)

    One option is to change the FileTypes option like you did:

    But then exclude the file from the build:

    I the image above you can see the line through the icon for test.guy.  This shows that it is excluded.  You an exclude a file by right clicking on the file and selecting exclude from build.

    Basically if there is a file in the project CCS will try to build it if it knows how to build it.  When we mark .guy as a linker command file it now knows how to build it.  But we can control which files are used in the build (per project configuration) by using exclude.

    I mostly use this when I have 2 versions of a source file that I am alternating between.

    Regards,

    John

  • Thanks,

    (I was hoping there would be a way that only affects the syntax highlighting and not the build process)