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.

Go To Function Declaration in Header File

Hi,

If I use control and left click or F3, CCS will take me to the function declaration.

Here is a question and perhaps suggestion for future features of CCS:

Instead of taking me to the prototype or declaration in the header file, can CCS take me to the definition or its source code in the source file?

Can it automatically take me to both by opening up both files?

This would be a helpful feature for development.

Regards,

sal

C2000 SW Apps

  • Sal,

    The way the feature works is if you are on a call to a function and hit F3 it should go to the definition.  

    For example here my cursor is on line 9.  

    I hit F3 and it moves to line 14

    I hit F3 again and it opens the header file with the declaration

    If I move john() to another file (john.c).

     

    Now when I hit F3 it opens the file with the definition of john() in it.

    There used to be separate open declaration (F3) and open definition (Ctrl-F3) but Eclipse combined them a while ago.

    Here are some tips that might be useful:

     I have main.c open and hit Ctrl-Tab then main.h will open

    Hold Ctrl.  Click on a funciton.  Will go to the definition.

    I realize that is not exactly what you are looking for.  I don't see any way to have it open both the declaration and definition.

    Regards,

    John

  • Ctrl-Tab is better than nothing!

    Thanks,
    sal
  • Is there a setting change that has to be made for this to work again in CCSv7? Using "Open Declaration" has always worked just fine for me, but in switching to CCSv7 recently I've found it only works like you mentioned if the declaration is in the same file that your cursor is in. If the function declaration is in another file, it takes me to its Header file, and if I hit "Open Declaration" again from the header file, it does nothing.

    Thanks,