Skip to main content
Graduate II
November 12, 2022
Solved

Rename project and also directory in STM32CubeIDE

  • November 12, 2022
  • 7 replies
  • 9687 views

When renaming a project in the project tree view it seems one can rename the project itself but not the directory it initially had been created in.

I have a project "myfirst1", renamed it to "myfirst" with all references. In the treeview one can see that it has been renamed, but there is still marked like:

myfirst (in myfirst1)

Trying to rename myfirst1 to myfirst behind the curtain leads to things getting messed up.

How can I achieve this cleanly, so that "in myfirst1" disappears and the project is located in directory "first" in the filesystem?

    This topic has been closed for replies.
    Best answer by MM..1

    I dont use it on MAC, but point 4 you can do too right click mouse on project explorer,

    choice Import - General - Existing ...

    7 replies

    Graduate II
    November 12, 2022
    1. rename project
    2. remove it from workspace
    3. rename directory
    4. double click .project import back into workspace
    chriskukuAuthor
    Graduate II
    November 13, 2022

    Only works partially. It's macOS. Besides from making dot files visible in Finder (which I got working), double clicking does fire Xcode instead of STM2CubeIDE. How do I import a .project from within STM32CubeIDE?

    MM..1Answer
    Graduate II
    November 13, 2022

    I dont use it on MAC, but point 4 you can do too right click mouse on project explorer,

    choice Import - General - Existing ...

    Visitor II
    September 7, 2024

    This solution is kind of partial for me, doing this a new folder structure is created with the old names and creates a new .metadata.

    chriskukuAuthor
    Graduate II
    November 13, 2022

    OK, thanks. Tweaked it otherwise now by editing all files accordingly. Only one Debug configuration got lost but maybe I can get it from a backup or re-create a new one. Next time I'll follow the above steps.

    Visitor II
    November 16, 2022

    5. Clean Project

    6. Build Project

    chriskukuAuthor
    Graduate II
    November 18, 2022

    I'm still trying to recover from the mess I produced when trying to rename the project. At the moment I cannot see the projects .ioc file in the tree. But there actually is the file. I copied one instance of it from a tar file I previously produced from the project tree. But CubeIDE doesn't recognize the .ioc.

    Graduate II
    November 18, 2022

    ioc + mx renaming is other story, because this i never rename projects only rename folder

    and see it as (in folder) = ok

    ofcourse cant have more as one this project in one workspace.

    chriskukuAuthor
    Graduate II
    November 18, 2022

    @MM..1​ Sorry, but I don't understand what you are saying, in other words I cannot get any information out of it that helps me to solve my problem.

    EDIT: solved it. CLEAN project made the file visble again in the treeview.

    Graduate II
    November 18, 2022

    Sorry i only report my solution. But for help recovery , have you any backup?

    ioc original is helpfull.

    Maybe this steps helps:

    1. create new project from existing ioc file
    2. set new name and generate code
    3. copy and overwrite all core files from backup
    4. refresh project in IDE
    5. try build