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.

C2000WARE: Copying links and maybe a bug in CCS

Part Number: C2000WARE
Other Parts Discussed in Thread: CCSTUDIO

I'm switching over to new C2000 6.0 and I see a folder called device. Neat. In my traditional folder, I have a bunch of links to, say:

C:/ti/c2000/C2000Ware_6_00_01_00/device_support/f2837xd/common/source/F2837xD_Adc.c

These clutter up my workspace so putting them into device folder sounds like a great idea. So I cut the link and paste it into device and voila, it has gone from my main directory and is now in device...

... Er, that's odd. It is no longer a *link* in device, it somehow got converted to a real file?! Damn. Ok, delete that and let me try again.

Oops. Turns out that I have just deleted the original F2827xD_Adc.c from the system folder!!?

They are still in my recycle bin, so no particular harm done, I can restore. But how should I copy links. And is there any way to not accidentally delete originals?

  • John

    Will have to check with the CCS team.  Which version of CCS are you using?

    Best Regards

    Siddharth

  • Details

    Version: 20.3.1.5__1.9.1

    Default VS Code API: 1.96.0

    VS Code Compatibility

    List of extensions

    • @ccs/ccstudio 20.3.0
    • @ccs/ccstudio-debug 20.3.0
    • @ccs/ccstudio-getting-started 20.3.0
    • @ccs/ccstudio-guicomposer 20.3.0
    • @ccs/ccstudio-plugin 20.3.0
    • @ccs/ccstudio-project 20.3.0
    • @ccs/ccstudio-support 20.3.0
    • @ccs/ccstudio-trace-config 20.3.0
    • @ccs/ccstudio-trace-viewer 20.3.0
    • @ccs/ccstudio-updater 20.3.0
    • @theia/ai-anthropic 1.58.4
    • @theia/ai-chat 1.58.4
    • @theia/ai-chat-ui 1.58.4
    • @theia/ai-code-completion 1.58.4
    • @theia/ai-core 1.58.4
    • @theia/ai-history 1.58.4
    • @theia/ai-huggingface 1.58.4
    • @theia/ai-llamafile 1.58.4
    • @theia/ai-mcp 1.58.4
    • @theia/ai-ollama 1.58.4
    • @theia/ai-openai 1.58.4
    • @theia/ai-scanoss 1.58.4
    • @theia/ai-terminal 1.58.4
    • @theia/ai-workspace-agent 1.58.4
    • @theia/bulk-edit 1.58.4
    • @theia/callhierarchy 1.58.4
    • @theia/collaboration 1.58.4
    • @theia/console 1.58.4
    • @theia/core 1.58.4
    • @theia/debug 1.58.4
    • @theia/dev-container 1.58.4
    • @theia/editor 1.58.4
    • @theia/editor-preview 1.58.4
    • @theia/electron 1.58.4
    • @theia/external-terminal 1.58.4
    • @theia/file-search 1.58.4
    • @theia/filesystem 1.58.4
    • @theia/keymaps 1.58.4
    • @theia/markers 1.58.4
    • @theia/messages 1.58.4
    • @theia/metrics 1.58.4
    • @theia/mini-browser 1.58.4
    • @theia/monaco 1.58.4
    • @theia/navigator 1.58.4
    • @theia/notebook 1.58.4
    • @theia/outline-view 1.58.4
    • @theia/output 1.58.4
    • @theia/plugin-dev 1.58.4
    • @theia/plugin-ext 1.58.4
    • @theia/plugin-ext-headless 1.58.4
    • @theia/plugin-ext-vscode 1.58.4
    • @theia/preferences 1.58.4
    • @theia/preview 1.58.4
    • @theia/process 1.58.4
    • @theia/property-view 1.58.4
    • @theia/remote 1.58.4
    • @theia/scanoss 1.58.4
    • @theia/scm 1.58.4
    • @theia/scm-extra 1.58.4
    • @theia/search-in-workspace 1.58.4
    • @theia/secondary-window 1.58.4
    • @theia/task 1.58.4
    • @theia/terminal 1.58.4
    • @theia/test 1.58.4
    • @theia/timeline 1.58.4
    • @theia/toolbar 1.58.4
    • @theia/typehierarchy 1.58.4
    • @theia/userstorage 1.58.4
    • @theia/variable-resolver 1.58.4
    • @theia/vsx-registry 1.58.4
    • @theia/workspace 1.58.4
  • John,

    Let me see if I am following correctly.

    Start by importing an example.

    That example has a bunch of "linked" files, i.e. files were not copied into the project and instead exist in the C2000Ware folder

    To clean up your project you created a "Device" folder and then dragged those linked files into the folder.

    Here I have imported an example, I see a bunch of linked files

    I created a "Device" folder.

    I drag some of the linked files into that folder.  On the right-hand side of my screen I can see that this actually performed a file system action and moved the file from my C2000Ware folder into the project folder in my workspace.

    Next I selected the F2837xD_SysCtrl.c file and did the same but this time I held down the option key.  I think on windows it would be CTRL.  For me a + shows up while I hold this key and drag the file, indicating that is going to copy the file instead of moving it.  I can see from my filesystem that the original file is still there.

    This means that the file is referenced by my project twice.  I can go back to the linked one and select delete.  It lets me know that it is just removing the reference to this file and not physically deleting it.

    If you instead want to keep the files as links (I would not keep them as links if there is any chance you may edit them) I think you would need to create the folder and then add new links and then go back and remove the original link file.  Here I right clicked on the Device folder and then selected the _struct file to link.

    Regards,

    John

  • Let's say I add F2837xd_Upp.c as a link. All is good

    But hey, let's tidy up a bit, so mouse over the text and drag/drop it to device folder

    It has not just created a copy of the original, it has moved that original and it is now uniquely in my folder (that's the bug). [Except of course I don't know that because I don't have open the window of all the system files.]

    Now I realize that I didn't make a link, silly me, I made a copy. So I delete so that I can do this properly.

    So this time around I go to device folder confident that I can do the "Add Files" and use Link this time. I go to get F2837xD_Upp.c and it is gone.

    Tricky, eh :-)

  • But looks like you can duplicate so I'll close the ticket: so what I'd request for the CCS team to set it up so that either (a) drag-drop a link results in a link or [less good] (b) drag-drop a link results in a copy but not (c) drag-drop a link results in a move of the original linked file. Probably not a high priority for them, but add to the list...

  • Ideally I would like for it to just change the linked resource so it appears in the new folder and does not touch the original file.  A further enhancement would be to prompt and ask if you wanted to move the link or make a copy of the original file.  The fact that it moves the real file is definitely confusing.  I need to talk with the team about what is possible. 

    We are going to be adding some "refactor" actions related to taking ownership of linked files that this might be able to tie into.  The refactor actions would be for selecting a linked resource (file/folder) and making a copy in your project.

    It would also be good if the examples were already setup with a "device" or maybe "sdk" folder containing the linked files so it is clear that they are not user files but just resources needed for the build. 

  • Here is the link to track the issue: https://sir.ext.ti.com/jira/browse/EXT_EP-13018

    Soonest we could get to it would be 20.5 in 1Q as 20.4 is wrapping up.