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.

MSPM0G3507: CCS Theia ctrl-click on function goes to wrong source when workspace has two folders (or is it projects?)

Part Number: MSPM0G3507
Other Parts Discussed in Thread: CCSTUDIO, SYSCONFIG,

Tool/software:

In CCS Theia when I ctrl-click on function it goes to wrong source when workspace has two folders (or is it projects?) 

So if I am in

project A -> main.c and I click on "init" function it takes me to the init function in the project B folder.  Really hard to work when I think I am editing project A's version and later find out I was editing project B's version.

Also seems like clangd makes all editing really slow.  Often keystrokes are ignore and then after a long 5-20 second delay suddenly all keystrokes are acted on.  Very annoying.  If I close and restart it seems to be better for a while.  So I close an restart at least once a day.  does clangd have a memory leak?  or ?  In general seems like clangd is very buggy?  am I running the right version??

Details

Version: 1.4.1.1

Default VS Code API: 1.85.1

VS Code Compatibility

List of extensions

  • @ccs/ccstudio 1.4.0
  • @ccs/ccstudio-debug 1.4.0
  • @ccs/ccstudio-getting-started 1.4.0
  • @ccs/ccstudio-guicomposer 1.4.0
  • @ccs/ccstudio-plugin 1.4.0
  • @ccs/ccstudio-project 1.4.0
  • @ccs/ccstudio-trace-config 1.4.0
  • @ccs/ccstudio-trace-viewer 1.4.0
  • @ccs/ccstudio-updater 1.4.0
  • @theia/bulk-edit 1.46.0
  • @theia/callhierarchy 1.46.0
  • @theia/console 1.46.0
  • @theia/core 1.46.0
  • @theia/debug 1.46.0
  • @theia/editor 1.46.0
  • @theia/editor-preview 1.46.0
  • @theia/electron 1.46.0
  • @theia/external-terminal 1.46.0
  • @theia/file-search 1.46.0
  • @theia/filesystem 1.46.0
  • @theia/git 1.46.0
  • @theia/keymaps 1.46.0
  • @theia/markers 1.46.0
  • @theia/messages 1.46.0
  • @theia/metrics 1.46.0
  • @theia/mini-browser 1.46.0
  • @theia/monaco 1.46.0
  • @theia/navigator 1.46.0
  • @theia/notebook 1.46.0
  • @theia/outline-view 1.46.0
  • @theia/output 1.46.0
  • @theia/plugin-dev 1.46.0
  • @theia/plugin-ext 1.46.0
  • @theia/plugin-ext-headless 1.46.0
  • @theia/plugin-ext-vscode 1.46.0
  • @theia/preferences 1.46.0
  • @theia/preview 1.46.0
  • @theia/process 1.46.0
  • @theia/property-view 1.46.0
  • @theia/remote 1.46.0
  • @theia/scm 1.46.0
  • @theia/scm-extra 1.46.0
  • @theia/search-in-workspace 1.46.0
  • @theia/secondary-window 1.46.0
  • @theia/task 1.46.0
  • @theia/terminal 1.46.0
  • @theia/test 1.46.0
  • @theia/timeline 1.46.0
  • @theia/toolbar 1.46.0
  • @theia/typehierarchy 1.46.0
  • @theia/userstorage 1.46.0
  • @theia/variable-resolver 1.46.0
  • @theia/vsx-registry 1.46.0
  • @theia/workspace 1.46.0
  • Hi Chris,
    I recommend updating to the latest version of CCS (it uses the same THEIA IDE). The newest version solved most of the issues that previous versions had.
    Best Regards,
    Diego Abad

  • What is the latest version?  And how do I update?  From within CCS or?

    Thanks!

  • NVM, I am downloading now. I downloaded CCS Theia from TI about 6 months ago, august of last year.   How did it go from version 1.xxxx to 20.xxx in a span of 6 months?  

    Thanks!

  • So tried to use the update from within CCS and it downloaded 900MB+ and said "have to close to install updates" and after all that there has been no update or change in version best I can tell.  No doubt pilot error on my part but what is my error?

    Thanks!

  • Now I am really confused.

    According to this latest version is 1.51.?!  Not 20.0.2.5?  You all clearly have a bug somewhere in the update process.

  • Now more confused.  This says

    "Code Composer StudioTm Theia v1.x. For the latest release please see CCSTUDIO."

    I do want the latest release and I am assuming it would not refer me to "see CCSSTUDIO" unless the page I was on was not the latest release.  So how do I "see CCSSTUDIO"  so I can get the actual latest release?

  • My Complaints continue to pule up.  Downloaded the "offline installer" directly from TI and started it.  I then get message "disable anti virus" so spent 10 minutes of aggravation since MSFT has made it a regedit problem to disable windows defender (when this this happen?!))  so I gave up on that and then read "or download the offline installer"

    So help me understand.  I thought I downloaded the 900 MB+ offline installer.  Was that just the "online installer" and that's why it needs me to disable the virus scanner?  If so 900MB+ seems like a awfully large online installer?

    This is what I downloaded.

    Is this the offline installer and requires no disable of the virus scanner or the online installer and require disable of the virus scanner?

  • After manually installing 1.5.1.3 (installing through clicking update did nt work) I launched and found that settings I had set earlier today on 1.4.1.1 had reverted to default. Earlier today I had unchecked "Enable CIO" and "Halt at program exit".  I unchecked these after much searching and googling and research about how many MSPM0 hardware breakpoints were supported I learned that these two very hidden check boxes freed up much needed breakpoints.  I assumed these changes would be saved as part of the build profile but after some testing I can confirm they are not.  Specifically I have 4 build configurations and if I change these settings on just one of the build configurations they are changed on _all_  build configurations.  So appears this setting is a global?  not saved with the build configuration?

  • Hi Chris,
    Sorry to hear that confusion. You need to download the latest version of CCS, not CCS Theia. Let me get you the link for it here: https://www.ti.com/tool/CCSTUDIO#downloads. I wouldn't recommend uploading your CCS from the IDE itself, but rather re-install it. I would also recommend to install the latest SDK and SYSCONFIG.

    Best Regards,

    Diego Abad

  • Now even more confused.  Are you saying there are two IDE environments that can be used interchangeably with MSPM0?  And they have 100% file compatibility?  One is CCS "Theia" and the other is just CCS?  And I should be using CCS and not CCS Theia?  Can you clarify the difference?  And what is CCSTUDIO?  Is that the same as CCS? Or CCS Theia? Or are they all the same but have been renamed multiple times?  And Looking at the CCSTUDIO documentation it says "Code Composer Studio combines the advantages of the Eclipse® Theia framework with advanced capabilities from TI resulting in a compelling feature-rich environment".  So is CCSTUDIO also using "Theia" framework then, same as CCS Theia?  You really need to clarify this for your customers.  Makes my head spin.  In Short:

    CCS - what is it?
    CCS Theia - what is it?
    CCSTUDIO - what is it?

    And which one should be used when?  And which one's files and settings are compatible with which one?

  • And can you clarify versions?  20.0.2.5 vs V1.x?

  • Hi Chris, 

    Yes. The latest version of CCS is what you can call the latest version of CCS Theia. TI decided to remove the label Theia and the Eclipse IDE. CCS and CCSTUDIO can be use to refer to the same thing. The version I recommend downloading is the latest you can find inside the link I sent (20.0.2) Any CCS version should be able to run any M0 device. Keep in mind that newer versions have better capabilities/bug fixes than the previous. 

    Best Regards,

    Diego Abad

  • First off - I do love CCS Studio.  Its a game changer for me.  Used to develop code for MSP430 with no IDE and no debugger, no breakpoints.  lots of use of LEDs, printf's etc.to know what was happening.  CCS Studio is a great tool.  But great tools can always be better Slight smile

    Now using CCS Studio and pretty much the same complaints:

    1) when ctrl-clicking on functions in project A it takes me to source from project B

    2) inexplicable delays/hangs that seem to be related to clangd constantly updating its view of the world.  Delays typing.  Delays responding to ctrl-click.  delays launchng debugger etc.  Status bar shows 4 x "clangd idle" ... is that normal?  does that mean it has 4 threads/contexts running?  each updating every time I type a new character?  or? why so many?

    3) When in a active debug session and I click build it always reloads code into the target.  Even when the build failed.  Very annoying.  Any way to say "do not load code if build fails"?

    Thanks!

  • Noticed that CCSTUDIO has chronic high CPU.  Note I am running on a 8 core CPU so 12.5% CPU is actually 100% of one core.  so 7% is > 50% CPU.  This is with CCSTUDIO window minimized so should be 100% idel?

  • Hi Chris,
    Thank you for the feedback. I'll let the software team know about the high CPU usage. As for your previous questions:
    1. Just to confirm, you have two projects in the same workspace, and when you ctrl+click in SYSCFG_DL_init, it goes to a different project's SYSCFG_DL_init, correct?
    2. Can you show a screenshot of what you mean by this? Are you referring to the TI Cloud not working?
    3. I tried this out, and it warned me before it tried to load the newly built code into the launchpad. Can you try a different project and see if any window pops up?
    Best Regards,
    Diego Abad

  • 1 - in _any_file in project A ctrl-click will randomly, sometimes, navigate to source in project B.  Sometime it works and stays in project A, other times it nvgates to the same function in project B.

    2 - pretty sure the delays are related to the high CPU.  I am not using TI cloud, or at least not that I know of.  I am using only local files/storage.

    3 - It does not warn "build failed, do you still want to debug" what it DOES do is _ask_"do you want to debug?".   No mention of a failed build.  What I want is automatic debugger reload if build passes and no debugger launch (and no question "do you want to debug") if build fails.  When build fails the debugger loads the .out file from he last successful build which is of course _already loaded_!  Why would I want to reload and debug same code thats already loaded?!

  • Hi Chris,
    Thanks for letting me know:
    1. Are both projects inside the same workspace?

    2. Got it. I'll rely this items to the software team as well.

    3. I also tried to build a failed build while in debug mode, but it didn't upload nor started a new debug with the failed build.

    Best Regards,

    Diego Abad

  • . Are both projects inside the same workspace?

    Yes.  2 folders/projects in same workspace. click on function in file in project A, takes you to function in project B.  clangd getting confused?

    I also tried to build a failed build while in debug mode, but it didn't upload nor started a new debug with the failed build.

    Correct - it prompts and asks if you want to debug.  problem is it ALWAYS asks even when build fails.  It should not ask when build fails.

    I have not used CCSTUDIO for hours.  every time I check, its high CPU

  • Hi Chris,
    1. Are the functions you are trying to access custom functions? I think that when there is a conflict in functions, the IDE shows you the list of files where the definitions or declarations could be. Also, are you using the default workspace?
    2. I tried this as well, and every time it failed, it didn't attempt to debug it after it failed. 
    Best Regards,
    Diego Abad 

  • 2. I tried this as well, and every time it failed, it didn't attempt to debug it after it failed. 

    I understand and agree that after compile you are asked if you want to debug.  I agree with you that if it fails I can click "no".  Again, my point is it SHOULD NOT ASK if you want to debug after a failed compile.  Its a waste of time making you click "no" and if you did not notice the failed compile (which I often do) and click yes then it debugs the last good compile which is an even greater waste of time.  Perhaps it will help us agree that if I say "I am not reporting a bug, this is a feature request"?  Can we then agree my request for a new feature "do not ask if you want to debug after a failed compile" would be an improvement?

  • Are the functions you are trying to access custom functions? I think that when there is a conflict in functions, the IDE shows you the list of files where the definitions or declarations could be. Also, are you using the default workspace?

    yes, they are in user code.  I have two projects, one was forked from the other so both have most user file and function names in common.

  • Hi Chris,
    The point I'm trying to make is that after a failed compile/build, no option appears and says, "Do you want to debug?" since the project just fails to build. If you are talking about the option not to ask to debug every time you build the same project, there is a checkbox you can click to save your decision whenever you build a project again while in debug mode. As for your second point, can you confirm there isn't any pop-up window that asks you which reference file you want to go to? 
    Best Regards,
    Diego Abad

  • I just ran a test. 

    1. no active debug session
    2. Using code that does not compile
    3. I click the debug icon (green bug with X in it)
    4. the build fails
    5. without a prompt or question the debugger launches automatically and loads last .out file from last good compile
    6. there was no warning, no question "do you want to debug failed compile" no nothing

    7. Now there is an active debug session.
    8. I click build  
    9. Build fails and now I am asked if I want to reload and debug THE FAILED BUILD.  See screenshot which shows the failed build and the pop up asking if I want to debug it.  


    You do not get this same behavior?  What version of CCSTUDIO are you using?  I am using Version: 20.0.2.5__1.6.2 Default VS Code API: 1.92.2

    so in BOTH scenarios failed builds are not handled correctly.

  • Hi Chris,
    I'm currently using the same version as you. When I try to do the same as you, I do notice that the latest .out file seems to be loading in the launchpad (I'm guessing this is a feature rather than a bug, I'll let the software team know just in case.) As for the behavior you are experiencing, can you try to do the same with a different project? I don't get the prompt you are getting after I fail to build a project while running a debug session from the same project. 

    Best Regards,

    Diego Abad

  •  I do notice that the latest .out file seems to be loading in the launchpad (I'm guessing this is a feature rather than a bug,

    100% sure that is a "feature" that no one wants.  Consider me a "power user" of your CCSTUDIO.  Multiple MSPM0 projects for wireless application with OTA firmware updates, booting multiple images etc.  I am compiling and debugging all day.  I want failed builds to stop all further actions including launching debugger or even asking me if i want to debug.

    Visual Studio - failed builds to not launch debugger

    Microchips MPLABX - failed builds do not launch debugger

    NO ONE WANTS THIS FEATURE.

    I have two projects in my workspace and it happens the same in both.

  • Hi Chris,
    As mentioned, the debugger doesn't ask to launch a faulty build project. The option doesn't appear after I build a project that has an error. I will ask the software team about the .out being uploaded if an already good .out file is available after a build fails. Can you try a project from our SDK and check if the same error happens? Preferably, pick a project showing noticeable execution like our gpio_toggle example. 
    Best Regards,
    Diego Abad

  • try the following -

    for a project with a .out file (must have existing .out file for this test)

    edit code and insert bug that stops build.

    click on the debug   icon.

    what happens?

  • Hi Chris,
    Thanks for the recommendation. After I followed the steps you recommended, here are the results. As you can see, no window appears asking if I want to debug it even when it fails. It is worth pointing out that .out file is not even generated when you have an error in the code that prevents it from building the project (and every time a project is build again, the .out file is removed from the debug folder.)  Just to confirm, when you mention editing the code and inserting the bug, are you referring to doing so when it's doing the building process?

    Best Regards,

    Diego Abad

  • The error is telling you that it was looking for a .out file to try and launch the debugger which agrees with my result.  But the error tells me you did not follow my instructions to reproduce the problem.  the error message tells me that there is/was no .out file.  first compile with good code to create .out file.  then edit good code to introduce an error.  then click on debug icon.  

    remember - you should be mimicking normal development.  edit then test, edit then test and every now and then a edit has a typo and build fails.  so there _will_ be a valid .out file, just not a .out that resulted from the failed compile.

  • Hi Chris,
    Every time you hit the build d a project, the previous .out file should be erased automatically from your debug folder, so if the build fails, it won't generate a .out. However, suppose somehow there is a .out file that was not corrupted in the debug folder during the build (regardless of whether the new build was successful). In that case, it will ask if you want to load the existing .out file (most likely thinking that the current .out file is the expected .out from a "good" build.) Thus, a "good" .out file in the debug folder, even when the build fails, is out of the regular behavior of CCS.
    Best Regards,
    Diego Abad

  • Not in my version of CCSTUDIO is the previous .out file always or automatically deleted.  The .out is only deleted if you do a "rebuild" (which is a make clean then build) or a "clean".

  • Hi Chris,
    That's an odd behavior. CCS should always erase the .out file when it builds/rebuilds a project. The only way to avoid this will be to move the good .out file and place it back to the debug folder, or to change the name of the .out file (though I wasn't able to make it run as you mentioned, AKA when the build fails, it doesn't allow me to run the "good" .out with a different name.) Can you try importing a project from our SDK and see if this ".out file not being erased after a build" behavior happens again?
    Best Regards,
    Diego Abad 

  • Of course I can manually delete the .out file or add a prebuild step to do it automatically.  But thats not the point.  If build fails it should not even ASK if you want to debug the failed build which.

  • Any progress on a fix for the original topic of this post?  This is a very dangerous and annoying problem for me.  I am in project a and I need to modify function and ctrl-click takes me to same function in project B and unless I am paying attention to the file path name I start editing the wrong file.  Thats BAD.

    MSPM0G3507: CCS Theia ctrl-click on function goes to wrong source when workspace has two folders (or is it projects?)

  • Hi Chris,

    MSPM0G3507: CCS Theia ctrl-click on function goes to wrong source when workspace has two folders (or is it projects?)

    There are several know issues with both multi-root workspaces and our clangd integration.

    The issues with the former have (mostly) been addressed on 20.1.0. I believe you are on an earlier version.

    The latter (clangd) still persists. The current clangd implementation simply does not play nicely in our environment. It is to the point that we are reworking it completely for 20.2.0. Unfortunately there is no good workaround for the various clangd issues until 20.2.0.

  • thanks I will update to 20.1.0, much appreciated!

  • How do I get the update?  Has it been released?  See below, says 20.0.2.5 is latest?

  • OK I see it is released here https://www.ti.com/tool/download/CCSTUDIO/20.1.0 but seems CCS  20.0.2.5 has bug and does not know it?  Or for updates from within CCS its published in  a location that only CCS looks and it has not been published there?

  • There is a known issue with the incremental update process that the CCS team wanted to address before posting the CCS 20.1.0 incremental update. Hence why it is not yet available.

    Thanks

    ki

    1. Still see problem where ctrl-click on function in project A (folder A) takes me to code in project B(Folder B).  This is really really bad!  It is not fixed!
  • And I want to add to my complaint that ctrl-click often takes me to the prototype definition in the header file which is 99% of the time NOT where I want to go and not the actual function itself.  So instead I have to go to the file where I think the function lives and the ctrl-h for the function name.  This is a really really slow way to navigate to a function.  Can this be fixed?

  • Both issues mentioned should be part of the clangd fixes targeted for the next release.