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.

Code completion not working in CCS v6.1.3

Other Parts Discussed in Thread: MSP430WARE

Hi folks

The code completion feature does not seem to be working at all in my current install of CCS v6.1.3.

when using the Ctrl + Space shortcut the drop-down shows "No proposals"  for function parameters, even for functions defined in the same file..

No drop-down appears at all when using the operators '->' or '.' with struct names

I have thread and linked slides here https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/368991

The indexer and code completion options in my preferences are all still set to their defaults.

Is there a known issue with this or are their other settings I can try?

Thanks, T

PS: Just noticed CCs v6.2 is available, can someone that has it installed let me know if completion is working for them in it? Ta

  • I might add that the completion was working with the current project in previous CCS versions, that I have not set the project specific indexer settings and I have tried rebuilding the index, to no avail :-(

  • Hi Toby,
    Can you provide more details about the issues you are seeing? Does it not work at all or just in specific cases? As always, if you can provide a small, reproducible test case, that would be very helpful.
  • Hi Ki,

    Thanks for the reply. To create small test I created a new workspace and a new project... now, with my minimal single file example, it seems to be working!

    Using a another small test project with the same code in my normal workspace still suffers from the same issues however. This obviously implies that I must have an issue with something in my normal workspace, some global setting or something. I can't for the life of me work out what it is though :-\

    I have noticed is that the automatic correction of the dot operator ('.') to the arrow operator ('->') where the latter is needed, still works. I'm assuming this works via the indexer as the functionality has to have knowledge of the object the operator is being used upon to be able to understand which operator is the correct one to use.

    I will continue playing with this nd see if I can figure out what the issue is.

    The code I use to check, in a new project, as I type the body of main():

    struct foo_obj {
        char bar;
    };
    
    typedef struct foo_obj* foo_handle;
    
    char buzz (char * bizz) {
        return *bizz + 1;
    }
    
    int main(void) {
        struct foo_obj a;
        foo_handle b = &a;
    
        a.bar = 'f';
        b->bar = 'c';
        buzz(&b->bar);
        return 0;
    }

  • Do you have the issue with other projects in your your standard workspace?

    Also check the indexer and content assist settings at both the workspace and project settings. Note that they are hidden by default and you'll need to "Show Advanced Setting" (option available at the lower left corner of the dialog) to expose them:

  • Hi Ki,

    I have my settings as below. The problem is across all projects in my workspace where I have multiple C2000 and MSP430 projects - some of the latter being example projects directly created from MSP430Ware.

    Other things that I'm guessing are related to the indexer work OK, such as syntax colouring for variable, function and object member usage, enum usage, etc

    Screenshots of the global content assist preferences, the global indexer settings and the project specific index settings (I think all the different projects' settings match this):

  • I've also just noticed that "search" (Ctrl + H) has stopped working. I'm not sure if this is related.
    I can copy a variable name and paste it into C/C++ Search or File Search and the search returns nothing in my current workspace - not even the definition or even the line I just copied from.

    It works completely fine upon switching to a new workspace.
  • Damn, I feel pretty silly. Somehow (fairly certain it wasn't manually changed as I didn't previously know what it did) , the Parsing-based proposals line under Window->Preferences->C/C++->Editor->Content Assist->Advanced, was unticked.

    Ticking this item's box corrects the issue.

    Mostly. Search is still behaving slightly strangely (opens a new search results view each time I search and doesn't close the search panel itself after finishing), but all the stuff I believe was related to the indexer is solved by this small thing! :-D

    I worked this out by opening a second CCS window that used the same project in a new workspace and comparing the workspace settings between each of the instances - changing the next different setting, applying the change, restarting CCS and then testing the behaviour.

    Thanks for your help Ki

    T

  • Thanks for the update Toby!