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/LAUNCHXL-F28069M: How to highlight function name in a CCS MotorWare Project?

Part Number: LAUNCHXL-F28069M

Tool/software: Code Composer Studio

Dear all,

I have a question related to managing variables/functions in CCS environment.

Why in example of MotorWare, all most function name is HIGHLIGHTED in the CCS window, such as the following figure:

While in my project, the same function was not highlighted, see the following figure:

How can I resolve the above problem?

Thank you in advance,

  • In the example "proj_lab01b" I see that the hal.c file is linked to the project.

    Is the same true for your other project?  In this case hal.c includes the function that is being highlighted.  Would you be able to attach the project where this is not working?

    Regards,

    John

  • Hi John,

    Thank you for your feedback. In my project, I copy all modules to project workspace, not using the link to the project. Whether functions in modules MUST be linked to the project can be highlighted or not?

    But why in your screen shot, in the same TIMER module, the function named TIMER_setPeriod() was not highlighted?

    I think the reason is somewhere, but currently, I don't know.

    Looking forward to hearing your ideas.

  • Tran,

    TIMER_setPeriod() is declared as static inline.  That is likely impacting the source scanner that determines if function names are highlighted.  Similarly if I look at calls to CTRL_setKp() in the lab source code they are also not highlighted and that function is inline.  The inline keyword is tricking the Eclipse syntax highlighter.

    If you can attach your project or if you don't want to attach it here you can send me a private message with it by clicking on my name, I can then see if I can reproduce what you are seeing and try to find a solution.

    Regards,

    John

  • JohnS said:
     That is likely impacting the source scanner that determines if function names are highlighted.

    John, I think the Eclipse Syntax Coloring highlights function calls which are considered to be "External SDK calls":

    Which means that calls to functions which are in source files within the workspace won't be highlighted, whereas calls to functions which are in source files external to the workspace will be highlighted.

    I think this explains Tran's observation that calls to functions for modules which have been copied to the project workspace are not highlighted.

  • Chester,

    It is odd as I would have expected the highlighter to not colour the external ones and not the other way around.  But this does appear to be the case.

    Tran,

    Go to Windows -> Preferences.  Navigate to the location shown in Chester's screen capture.  To do this you have to click on the link at the bottom of the dialog to "Show Advanced Options".  Then go to C/C++ ->Editor->Syntax Coloring.

    Then on the right expand Code and go to Functions.  Check the box to enable and then check the box to bold and change the colour if you like.

    If I do this then I get this for your project:

    thanks Chester!

    Regards,

    John

  • Dear John and Chester,

    I resolved my issue by using your guides. Thank you very much!