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.

Workspace Confusion

Hello,

I have two seperate projects, each with their own folder. Shown below.
Each folder has its own workspace folder. (called WorkSpace - you can see it below)
Each folder has two CCS projects in it (EverestPrimary, EverestSecondary)
In each folder shown below, I have created batch files to perform builds from the command line (makePFC.bat (EverestPrimary project), makeDCDC.bat (EverestSecondary) etc).

Each folder above has a workspace folder in the root.

Below I have opened a workspace.

Each time I swap between the workspaces, it seems the other workspace is 'damaged' and my build batch files dont work.    I get the error that a project no longer exists in a particular workspace.


When I go to re-open than workspace, it is not as I saved, it , but it shows two folders, but you cant expand the projects - they havent opened.

So my question is, what really fundamental aspect of WORKSPACES do I not understand?

Why is a workspace ruined, when I have SWITCHED to another, and then SWITCHED BACK?

AND

Is it possible to compile a project from the command line without having to specify a workspace? - because this could be a work around?

Hope this makes sense to someone!

Regards, Nick

  • Hi Nick,

    I hope you're creating a workspace with the help of CCS and not manually (by adding folders), right?

    Regards,

    Gautam

  • Cant remember how they were created Gautam.

    But I switch workspaces like below :-


    If they had been created in Windows using "new folder", and  then I had pointed CCS at it using switch workspace,  then how do I fix this problem?

    How do I create a 'PROPER' new workspace for each of my pre-existing projects?

    Each workspace would have two projects in it.

    I dont think it is a good idea also, that when CCS cant find a workspace, it creates a new BOGUS empty workspace, instead of saying,   HEY!!   I cant find your old workspace where I expected it to be!

    Nick

  • Nicholas Parker said:
    How do I create a 'PROPER' new workspace for each of my pre-existing projects?

    Simply after CCS's splash logo, you're requested to direct to a folder. Here you can add a new folder by typing a new name. In this way CCS creates new workspace with related files.

    Try this and shift your projects to newly created workspace. Let me know how this goes.

    Regards,

    Gautam

  • Gautam,

    I am using CCS v5.5

    And Nope - CCS just reopens the last open workspace I used,  if I quit and reload.


    However, if I quit and then rename the folder where my workspaces are located, then CCS just creates a new empty structure of folders (emulating what was there a moment ago before I renamed the old folder) and then I have a blank workspace called using name it was looking for.

    Nick

  • Nicholas Parker said:
    However, if I quit and then rename the folder where my workspaces are located, then CCS just creates a new empty structure of folders (emulating what was there a moment ago before I renamed the old folder) and then I have a blank workspace called using name it was looking for.

    You should not rename the folder externally. All the changes have to be done from CCS project window. Try using File->Switch Workspace to create a new one.

    Regards,

    Gautam

  • Hi Nick,

    Nicholas Parker said:

    Each time I swap between the workspaces, it seems the other workspace is 'damaged' and my build batch files dont work.    I get the error that a project no longer exists in a particular workspace.


    When I go to re-open than workspace, it is not as I saved, it , but it shows two folders, but you cant expand the projects - they havent opened.

    So my question is, what really fundamental aspect of WORKSPACES do I not understand?

    Why is a workspace ruined, when I have SWITCHED to another, and then SWITCHED BACK?

    CCS/Eclipse should fully support switching back and forth between multiple workspaces. In fact, using multiple workspace is encouraged. This is actually fundamental behavior and I do this all the time without issue.

    Nicholas Parker said:
    Is it possible to compile a project from the command line without having to specify a workspace? - because this could be a work around?

    Yes. You can simply call gmake (or whatever make utility you wish to use) directly on the project makefiles.

    Thanks

    ki

  • Nicholas Parker said:
    If they had been created in Windows using "new folder", and  then I had pointed CCS at it using switch workspace,  then how do I fix this problem?

    This is supported

    Nicholas Parker said:
    How do I create a 'PROPER' new workspace for each of my pre-existing projects?

    The way you are doing it (using 'Switch Workspace') or selecting it when prompted on startup as Gautam mentioned both are fine.

    Nicholas Parker said:
    I dont think it is a good idea also, that when CCS cant find a workspace, it creates a new BOGUS empty workspace, instead of saying,   HEY!!   I cant find your old workspace where I expected it to be!

    Using the 'Switch Workspace' option to select a new workspace is a valid way for selecting a new workspace. So it really is not a bogus new workspace but simply CCS will either use an existing one or create a new one if the former does not exist.

  • Nicholas Parker said:
    And Nope - CCS just reopens the last open workspace I used,  if I quit and reload.

    Most likely you checked the option to never prompt you again. You can use the 'Switch Workspace' option instead (like you were already doing).

  • Hi Guatam,

    I believe this is a moderately serious BUG and I have been able to replicate it.

    If not a bug, then I would call it a big inconvenience!

    The problem occurs when you MOVE a folder containing your workspace and project (obviously this move occurs when CCS is not running!)

    If a folder is moved, then when CCS is started up following this, CCS 'recreates' the missing folder structure around the workspace folder.

    First question :: Why does CCS not alert the user that the folder is missing?

    Following this,I select 'SWITCH WORKSPACE' because I obviously want to select my (moved) worksapce, not some empty placeholder that CCS has created from thin air!

    BUT, when you point CCS to the new worksapce location,  and reload it,   it gets TRASHED!!

    See picture below - the project folders are shown, but they cannot be expanded. 

    The only way forwards from here it that you MUST delete the broken projects and then re- IMPORT them.

    Your workspace has been damaged by CCS!

    Second Question : How does one make a portable project with this kind of behaviour from CCS?

    This seems to be a major issue. 

    As a programmer I should have the freedom to move folders around on my hard drive (or rather rename the root folder, and given that all the paths are relative, and that the relative workspace vs project  vs source files locations  have not changes, there should be no problem!  I should not have to deal with having to recreate a destroyed workspace.

    Regards, Nick

  • ...back to the original problem...

    Nick,

    Nicholas Parker said:

    Each time I swap between the workspaces, it seems the other workspace is 'damaged' and my build batch files dont work.    I get the error that a project no longer exists in a particular workspace.


    When I go to re-open than workspace, it is not as I saved, it , but it shows two folders, but you cant expand the projects - they havent opened.

    Does this workspace corruption happen when running your command-line build scripts? Or do you see this corruption when you switch back and forth via CCS GUI without ever running these scripts?

  • Nicholas Parker said:
    The problem occurs when you MOVE a folder containing your workspace and project (obviously this move occurs when CCS is not running!)

    Ah ok. I get it.

    The workspace folder is not meant to be moved around or something that is meant to be "portable". This is not a CCS thing but an Eclipse thing. What you are tying to do may be possible though. I will have to dig further.

    ki

  • Hi Ki,


    Yesterday I was changing too many variable and getting confused trying to find the problem.

    The problem is not SWITCHING workspaces per se.   But rather, switching workspace following renaming a folder (or perhaps changing the path) that contains say a workspace, and a project and some source files)

    When the Switch Workspace is performed following in this situation, then the workspace loads, but the contents are damaged -i.e. projects in the workspace are shown, but they cannot be expanded or built and must be deleted from the workspace and re-added.

    Regards, Nick

  • If someone in China (as opposed to New Zealand where I am) checks out my project from source control, I am concern it WONT build because the workspace may not be in the SAME location as on my computer - and when loaded CCS will corrupt it -  that is why I asked about building without refererring to the workspace, because it seem unreliable.

    Thanks, Nick

  • Nicholas Parker said:
    If someone in China (as opposed to New Zealand where I am) checks out my project from source control, I am concern it WONT build because the workspace may not be in the SAME location as on my computer

    Which files are being checked into source control?

    Have you seen http://processors.wiki.ti.com/index.php/Source_control_with_CCS#Files_to_check_in?

    Some of the other files under the workspace look to have absolute paths, e.g. those under the .metadata directory in the root of the workspace, so they could cause something to break if placed under source control.

  • Hello Ki-Soo,


    I have changed my build batch files to use "gmake all" on the makefile (rather than use CCS to do the command line build), however, I have discovered another problem (well...the same problem).

    The targets (objects) specified in the makefile are also using absolute paths. So it appears I still cannot have the project/workspace/source folder in an arbitrary location on my HDD.

    But I noticed that .project and .project files use relative paths......grrrr

    So it seems I would need to re-generate the makefiles (and their absolute paths) from the ".project"and ".cproject" files.  I am guessing I am back to needing CCS to do this?  In which case I also have the workspace issues again?

    Cheers, Nick

  • Thanks for the link Chester.

  • Nicholas Parker said:
    So it seems I would need to re-generate the makefiles (and their absolute paths) from the ".project"and ".cproject" files.  I am guessing I am back to needing CCS to do this?

    Yes you would. CCS generates the makefiles from the .*project files. I suppose you can do away with CCS and start maintaining the makefile yourself manually but that would mean losing the "managed make" part of your CCS project.

  • Ki-Soo,

    How am I to give somebody a project that they can place at any location on their hard drive and build simply clicking a batch file?

    Note : I do not want to write/manage the makefile myself.

    Nick

  • Nicholas Parker said:
    Thanks for the link Chester.

    As Chester mentioned, you do not need to worry about the workspace location to be able to build a portable project. Also check out this url for more details on portable projects:

    http://processors.wiki.ti.com/index.php/Portable_Projects#Portable_Projects_in_CCSv6

    Or the training module:

    http://processors.wiki.ti.com/index.php/CCS_Modules_Library#Portable_Projects

    ki

  • Nicholas Parker said:
    How am I to give somebody a project that they can place at any location on their hard drive and build simply clicking a batch file?

    In my previous post, see the links on creating a portable project. It covers things you need to do to make your project portable and easily sharable to others where the project can be in any location.

  • I had a quick look through the powerpoint.  I am already using 'linked' files.  Problem is though, that even if you do this, the generated makefile (the one I would call with gmake) has resolved (absolute) paths in it.

    I want to re-iterate, that I am not want necessarily to have my colleagues import my project into their workspace BEFORE they build.    I want them to be able to build simply by clicking a batch file.   Not by first importing my project into their workspace.

    I'm not sure if our wires are crossed, or if I don't understand your direction.

    Thanks,  Nick

  • Nicholas Parker said:
    the generated makefile (the one I would call with gmake) resolves the paths to absolute.

    Since we have pretty much settled on using CCS to build instead of manually calling gmake, the fact that the generated makefiles have absolute paths is irrelevant to the portability of the project. You can give this project to someone, they will import it into their workspace and build it and it should just work if set up correctly.

  • Can you please clarify for me Ki-Soo.

    1.  Do you agree it is not possible to send somebody a project and have them build it from command line only using gmake? Unless I write the makefile myself (due to absolute paths used in makefiles)

    2.  Do you agree the project MUST be imported into a worksapce in CCS to get the makefile rebuilt with the correct absolute paths?

    Thanks, Nick.

  • Nicholas Parker said:
    I want to re-iterate, that I am not want necessarily to have my colleagues import my project into their workspace BEFORE they build.    I want them to be able to build simply by clicking a batch file.   Not by first importing my project into their workspace.

    They cannot avoid this step. There is no way they can build a CCS managed make project without it being associated with a workspace. If you want to have them build by clicking a batch file, you can have it so the batch file will first import your project to some workspace location (which the user can either specify via passing it in to the batch file or have them modify a line in the batch file) and then build the project in that workspace.

    You must use a workspace unless you decide not to use a CCS project (which is fine, many people rather create their own makefiles also).

  • I think we are replying to quickly to each others posts where we don't see the last post for each other :)

    Nicholas Parker said:
    1.  Do you agree it is not possible to send somebody a project and have them build it from command line only using gmake? Unless I write the makefile myself (due to absolute paths used in makefiles)

    Yes

    Nicholas Parker said:
    2.  Do you agree the project MUST be imported into a worksapce in CCS to get the makefile rebuilt with the correct absolute paths?

    Yes

  • Thanks for the Clarification Ki-Soo. 

    The only thing that dissallows what I am trying to do is the fact that ABSOLUTE paths are used in the makefile....That answers my questions on portability.  

    On the other issue :-

    I still have concerns about how when a workspace is moved, that CCS will destroy it when CCS is "switched" to the new workspace location.  Not sure that everything is as it should be.  Perhaps I can start a new discussion on these forums and hopefully get a bit more attention on these apparent undesirable behaviours!

    Thanks, Nick

  • >> I think we are replying to quickly to each others posts where we don't see the last post for each other :)

    Yes haha. I think so too!

  • Actually - I guess the other issue (moving or renaming a workspace) is also an absolute path problem.  I'll be the Workspace would use absolute paths to the project files.....ah well....Might be nice to have an option of "projects are relative to workspace" for 'dangerous' users such as myself.....