cancel
Showing results for 
Search instead for 
Did you mean: 

Rename project and also directory in STM32CubeIDE

chriskuku
Senior II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

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

choice Import - General - Existing ...

View solution in original post

10 REPLIES 10
MM..1
Chief II
  1. rename project
  2. remove it from workspace
  3. rename directory
  4. double click .project import back into workspace
chriskuku
Senior II

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..1
Chief II

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

choice Import - General - Existing ...

chriskuku
Senior II

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.

FOber.3
Associate

5. Clean Project

6. Build Project

chriskuku
Senior II

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.

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.

chriskuku
Senior II

@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.

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