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: Debugger "Out Of Sync" With sources

Tool/software: Code Composer Studio

Hi, 

in continue to my post : https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/699429/2579670#2579670 

I had encountered this again - again while debugging the source was completely out of sync.

I, as before, created a new file and copied ALL the contents of the original file the the new file, and recompiled, and gain now it was in sync.

i compared the two files using beyond compare and the only differences were whitespace differences -  mainly tabs (in the original file) were now spaces in the new file.

Also i debugged with the original file several times and had no issues. 

I really need some help to figure this out and prevent this from repeating.

(only thing i can think of that changed from before is that i may have now used a newer CCS version (8.1) - i don't recall if i had already used this new version while debugging this specific file - could this somehow be related, and if so, how and why?)

Thanks

Guy

  • Hi Guy,

    If you click on the source file name in the Modules view, does the compilation path match the path to the new file with the sync issue?

    Thanks

    ki

  • I suggest the following (this is for an MSP432 target, you may see something different if you have a different target)

    1. Right click in on your project in Project Explorer -> Properties -> Build - > ARM Linker -> File Search Path.  Make sure all those paths are what you expect and are correct for your target.  (I had entries that were for a different version of the MSP432)

    2. Right click in on your project in Project Explorer -> Properties -> Build - > ARM Compiler -> Include Options.  Again, make sure all the paths make sense.

    3. Right click in on your project in Project Explorer -> Properties ->Build. Checks the entries in the Variables and in the Environment tab are what you expect.

    3. Right click in on your project in Project Explorer -> Properties -> Resource -> Linked Resourced.  Check everything is correct in the "Path Variables" tab, then take a look in the "Linked Resources" tab and verify that you are not linking to a file from an unexpected location.

    Hope this helps.

    Cheers

  • Hi,
    All project settings are fine and the file under debug seems to be the correct one.
    So far the only way i found to resolve it (as i mentioned before) is to copy all the contents of the "bad" file to a newly created file, delete the old file, rename the new file to the original name and rebuild. project setting remain unchanged during this all process...

    Guy
  • Hi Guy,
    Did you check the Modules view as mentioned in my previous post?

    If the path does match, Can you attach the "bad" file to this thread? Please start a private conversation with me if you wish to share privately.

    Thanks
    ki
  • Could you give more detail about what "out of sync" means?

    What specifically is going wrong? What is the code that should be running (i.e. what you see on the screen) and what happens instead as you step through that code?

    e.g. you single step across a line of code that says a++; and a is incremented by 3
  • Hi,
    I tried rebuilding with the original file that i had problems with but I was not able to reproduce the problem.
    I should not that since then, since CCS get stuck a lot, i had to delete my workspace as start a fresh one, so this can mean that the problem somehow depends both on the CCS "state" and the file itself.

    As for "out of sync" i mean when debugging, the debugger does open the correct file but points to wrong location so that i can take single steps or place breakpoints and the debugger will show as if i am stepping on the comments or some other parts of the same file...

    Guy
  • Hi,

    I have seen similar things to that in the past, and it's always been that the debugger has decided to open another file that happens to have the same name. (Particularly happens for TI library files [e.g. SimpleLink] when you have multiple versions of that library installed).

    In the CCS editor, different source files get put into different tabs. If you hover you mouse over a tab for a few seconds, a tool tip pops up giving you the location of that file.

    If you do get the "out of sync" state again, try hovering your mouse over the problem file's tab and see if the file that is displayed is the file you expect.

    Cheers
    Julian
  • Hi,
    Thanks but at least in my case these were local project files and there are no other files in the same name ...

    Guy