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: Eclipse allows the project’s source and metadata files to have relative paths located outside of the workspace. Does CCS Theia allow for this too?

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

Luis and team,

Up to this point we've been working with our customer from the perspective of an example project that is saved into their own workspace.  Now, they'd like to rename the project and move it into a repository folder located outside of the workspace.  Eclipse allows the project’s source and metadata files to have relative paths located outside of the workspace.  Does CCS Theia allow for this too?

Indeed, this is an interesting request.  I too couldn’t find a way to do it.  As you said Luis offline, we can add relative #include paths and libraries, but couldn’t find an easy way to add relative files and folders.

We also assume that until it’s supported, the workaround with Gitlab is to manually copy the project folder between the local repository and the TI workspace after pulls and before commits.  Is that correct?  We were trying to determine whether the local repo could be located inside the TI workspace as a better work around, but doubt that would work if the project folder isn’t placed at the root of the repo.

TY,

Chris

  • Hi Chris,

    I tried a few ways to do this myself  but I haven't had any luck as well. I'm reaching out to our software and tools team and will let you know what they say.

    Just for clarity, what is the final goal here? Is it just to have two projects in the same workspace that are in different folder paths? Is it to be able to work in CCS Theia directly from the files in the Repo, without the workspace metadata files being included in the repo?

    Best Regards,
    Brandon Fisher

  • Hi Brandon, Luis, team;

    So the customer assumes the files we generally refer to as workspace metadata files are those which are related to the workspace only and don’t affect an application’s compilation.  An example would include our editor font preference settings.  Those are files that they typically wouldn’t wish to keep within their FW project repository.  Here’s an example of one of their repos showing how they traditionally have an application FW eclipse project (ATS_Application) and a bootloader FW eclipse project in separate subfolders within a single repo.  These subfolders have no information about the workspace. Developers create their own and open the two projects within theirs, as noted by the customer. All project source file changes are saved directly into the repo subfolders.

    Comments?

    Thanks much,

    Chris

  • Hi Chris, 

    There are couple of options : 

    1. Assuming you have official CCS Theia v1.0.0 release, then select File->Open folder and navigate to "Firmware" directory. Assuming that .cproject, .project files are inside ATS_Application directory, as an example, then CCS Theia will find them as project (there should be a little cube overlay on a folder). If there are some IDE settings stored in .theia folder then it should be relatively simple to add this directory to gitignore. 

    However, if CCS project files (.project , .ccsproject) exist in a child directory of ATS_Application then that subdirectory would need to be opened instead.

    2. You can keep main work folder where it is convenient, you can then right click on Project Explorer and choose "Add Folder to Workspace" option, then navigate to Firmware directory (same assumptions as for #1 still stand). This extra directory will be added to original folder (aka workspace).. You could actually add a second or third repo the same way.  The main requirement is project names (e.g. ATS_Booloader) still need to be unique after multiple folders are opened this way. 

    E.g. using your example : let's you had a cloned repo in "AtsGitRepo" and "AtsGitRepCopy" where contents was identical, they were just located in different dirs on the filesystem. You could add both of these folders, but second folders projects would not have cube overlay which indicates that they are not buildable. 

    Martin

  • Hi Martin, 

    Very helpful, thanks! 

    They have since tried option 1, closed and reopened CCS and now see the project as you described. 

    Is there something explicitly they also need to do next in order to open/edit the syscfg file and to build?

    Thx,
    Chris

  • Hi Chris, 

    As long a project folder icon is decorated with cube icon overlay, then all project functionality should work. Build, debug and opening of .syscfg file.

    Martin

  • The main reason asking is because the sysconfig tool and compilation apparently didn’t work for them when opening a folder. 

     Can you maybe explicitly show a screenshot of the cube icon overlay you are referring to?  I’m not exactly sure where they should look for this either.

    TY,
    Chris

  • Hi Chris,

    What version of CCS Theia have they installed?

    I believe the cube Icon that Martin is referring to is this one in the bottom corner of the project folder:

    Best Regards,
    Brandon Fisher

  • Hey Brandon,

    Thanks!  Here’s their version

     The My secure resources page shows this as the latest version.

     Their project folder located inside the TI workspace has the cube.  But the one that they manually copied to a different location on their C:/ drive and then opened using [menu]àFileàOpen Folder… doesn’t.  Maybe that’s why it won’t open the SysConfig Tool or perform a compilation.  Do you know what they may need to configure to show the cube explicitly?

    TY,
    Chris

  • Hi Chris, 

    My and Brandon's comments are applicable to CCS Theia v1.0.0, which is now available through https://www.ti.com/tool/CCSTUDIO or MSPM0 product folder e.g. https://www.ti.com/product/MSPM0G3507

    Martin

  • Thank you Martin and Brandon.  I will discuss with our customer and advise any further input needed.  Appreciate it!  THis thread may be useful for others in the future as well, I believe.

    Regards,
    Chris

  • The lead engineer has tried this - added the path to version 1.15

    But still can’t select 1.15 as a dependency.

    What do you guys think on this?  Something trivial…?

    Thanks,
    Chris

  • Posting this here since the last follow-up was via Email:

    Per Martin,

    First picture is showing/detecting Compilers only. Please click on Products and then add a path to SysConfig v1.15.

    Once discovery runs you should see 2 versions of SysConfig in bottom portion of the window. After that you should be able to select it in the drop down.

    Please have them give that a try and follow up if that solves their issue. 

    Best Regards,
    Brandon Fisher

  • That worked.  They missed the step to click Products and also added the path to the wrong list.  The Sysconfig tool opens now for files sysconfig files in the workspace. 

    Their end game is to load a project from outside of the workspace (or set a relative path to a project outside of the workspace).  Using Menu à Open Folder for this but it currently generates an error and appears stuck initializing.

    !SESSION 2023-03-23 16:04:46.642 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=17.0.2
    java.vendor=Eclipse Adoptium
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments:  -application com.ti.ccs.server.start -pluginCustomization C:\ti\ccstheia100.21\ccs\eclipse\ccs.preferences.ini -ccs.socketPath \\.\pipe\8184080a753c6cd62d9defb746234708.sock -ccs.workspaceFolderPaths c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.defaultImportDestinationPath c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.buildSecurityPolicy level:desktop
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -application com.ti.ccs.server.start -pluginCustomization C:\ti\ccstheia100.21\ccs\eclipse\ccs.preferences.ini -data C:\Users\mcdonab10122\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces\8184080a753c6cd62d9defb746234708 -ccs.socketPath \\.\pipe\8184080a753c6cd62d9defb746234708.sock -ccs.workspaceFolderPaths c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.defaultImportDestinationPath c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.buildSecurityPolicy level:desktop
    
    !ENTRY com.ti.ccs.core 1 0 2023-03-23 16:04:47.390
    !MESSAGE [ccs.trace] CCSServer> IDE session in progress: 77c62c37-e03b-4d35-9026-f75cfd91c309
    
    !ENTRY org.eclipse.osgi 4 0 2023-03-23 16:04:49.294
    !MESSAGE Application error
    !STACK 1
    java.util.NoSuchElementException
    	at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(Unknown Source)
    	at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(Unknown Source)
    	at com.ti.ccs.server.core.WorkspaceSynchronizer.initialize(WorkspaceSynchronizer.java:281)
    	at com.ti.ccs.server.CCSServer.startUp(CCSServer.java:399)
    	at com.ti.ccs.server.CCSServer.start(CCSServer.java:286)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
    !SESSION 2023-03-23 16:09:46.177 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=17.0.2
    java.vendor=Eclipse Adoptium
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments:  -application com.ti.ccs.server.start -pluginCustomization C:\ti\ccstheia100.21\ccs\eclipse\ccs.preferences.ini -ccs.socketPath \\.\pipe\8184080a753c6cd62d9defb746234708.sock -ccs.workspaceFolderPaths c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.defaultImportDestinationPath c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.buildSecurityPolicy level:desktop
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -application com.ti.ccs.server.start -pluginCustomization C:\ti\ccstheia100.21\ccs\eclipse\ccs.preferences.ini -data C:\Users\mcdonab10122\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces\8184080a753c6cd62d9defb746234708 -ccs.socketPath \\.\pipe\8184080a753c6cd62d9defb746234708.sock -ccs.workspaceFolderPaths c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.defaultImportDestinationPath c:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang -ccs.buildSecurityPolicy level:desktop
    
    !ENTRY com.ti.ccs.core 1 0 2023-03-23 16:09:47.040
    !MESSAGE [ccs.trace] CCSServer> IDE session in progress: 55a814c8-a761-4d3d-829a-771438684601
    
    !ENTRY org.eclipse.osgi 4 0 2023-03-23 16:09:48.866
    !MESSAGE Application error
    !STACK 1
    java.util.NoSuchElementException
    	at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(Unknown Source)
    	at java.base/java.util.LinkedHashMap$LinkedKeyIterator.next(Unknown Source)
    	at com.ti.ccs.server.core.WorkspaceSynchronizer.initialize(WorkspaceSynchronizer.java:281)
    	at com.ti.ccs.server.CCSServer.startUp(CCSServer.java:399)
    	at com.ti.ccs.server.CCSServer.start(CCSServer.java:286)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
    

    ?


    Thx,Chris

  • Thank you Chris. I'll forward this information to right contact. 

    Martin

  • Appreciate the help on this Martin!

    -Chris

  • Martin and Team,

    Just to clarify, the remaining pesky issue "Using Menu --> Open Folder for this but it currently generates an error and appears stuck initializing." is the last inquiry we'd like to resolve for the customer.  Thank you again in advance for your support on this.

    -Chris

  • Hi Chris,

    I am able to reproduce the issue, and I will fix this bug for the next release (v1.1.0).  In this particular scenario, the user opened a single project's root folder, and used that as the workspace - C:\Projects\TI Migration\Firmware\blink_led_LP_MSPM0G3507_freertos_ticlang.  Although this should be supported, and should not result in an error, this is not the most practical approach.

    It would be better if the user opened the parent directory as the workspace - C:\Projects\TI Migration\Firmware.  That would allow the user to work with all projects in the "Firmware" directory.  In general, the File > Open Folder... action is meant to open a directory that contains one or more projects (as its direct children).  This is referred to as a "single root workspace" - the directory "Firmware" is the single workspace root, containing one or more projects in it.

    An alternative approach is the "multi-root workspace".  In this use-case, the user can add multiple random filesystem locations to his workspace.  This can be done by right-clicking in the Project Explorer view and selecting Add Folder to Workspace... action.  Each location that user adds to his workspace is referred to as a "workspace root".  Each of these locations can either be a directory that contains one or more projects, or it can be the root of a single project.  This is the most flexible approach.  In this use-case, the user will be asked to save the workspace into a file.  This file is plain text file in JSON format, with the extension '.theia-workspace', and it will specify the paths to each workspace root.  Each workspace root can be referenced as an absolute URI, or as a relative path.  If relative paths are used, then this workspace JSON file can be source-controlled and used in a team environment.

    Let me know if this unblocks the user.  Note that the user will need to re-start CCS Theia after he opens the "Firmware" folder, to get around the stuck "Initializing" notification.

    - Baltasar

  • Baltasar,

    I thank you!  Appreciate taking the time to test and verify this.  A fix as you described should be more than adequate.  I will discuss with the appropriate parties involved on the customer side.  Thanks again, Chris.

    P.S.  Should be able to mark this resolved now, thanks again.