[resolved] Rename/Checkout STM32 Project to different folder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-15 6:07 AM
Sometimes I end up working on multiple branches of a project (ain't life fun!).
With STM32CubeIDE it seems if I rename the project folder
Project
Project_Main
Project_BranchX
Then the Sources paths defined in the project are broken/lost, and any excludes in those sources folders are lost (The sources folders in project tree are empty).
Is there a way to define custom sources folders such that they aren't lost/broken if project folder is renamed? (i.e. relative paths or similar)
Using: Win10, STM32CubeIDEv1.10.1
Paul
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-15 7:42 AM
I use this steps , but in one workspace you an have only one named project .
- In IDE delete project from workspace (no files)
- In file manager rename top folder for project
- iDouble click .project file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-15 9:52 AM
I didn't describe it well.
So our Git has many STM32CubeIDE projects in a folder, as well as several folders of shared files (libs)
git_folder
- project1
- project2
- project3
- sharedA
- sharedB
When add files in shares to projects using Source/Include/exclude, the path to the shares is absolute, not relative. If I rename git_folder, or check out to a slightly different named folder (git_folder2), then the shares in the projects fail since the absolute path no longer works.
I guess a bit issue is how we handle the shares. We haven't built these into true libraries because they are in early development and being constantly added to and debugged.
Any suggestions on how to handle the shares?
- Is there a way to put a relative path in project sources (project\..\sharedB)?
- something completely different?
- There are actually about a dozen projects and half dozen shares, and growing. Many custom interconnected PCBs.
Using: Win10, STM32CubeIDEv1.10.1B
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-15 10:40 AM
When you rename a containing folder of a project but not the project itself, then obviously all things like ${workspace_loc:/${ProjName}/...} become invalid.
Same if you change the project name but not the folder.
In these cases try to change ${workspace_loc} to ${ProjDirPath}. ${ProjDirPath} is always the correct directory path of the project..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-15 11:31 AM
For sharing maybe not use exclude and different project folder, but add shared as MKLINK folder under project, that use it. Link name cant change , but linked folder yes.
Advantage is no exclude required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-18 9:25 AM
Guess I was just having a strange week last week.
Nice fresh Monday, and a simple ..\ works as expected to create a relative path.
In sources I select the path to ShareA, then replace its long absolute path with ..\ and it works, even when copy/rename repository.
- Absolute Share: D:\data\git\repo5\__code\ShareA
- Relative Path: ..\LibST
- For Project: D:\data\git\repo5\__code\Project1
- Project > RightClick:Properties > C/C++ General> Paths and Symbols > Source Location:
- Link Folder… > [+] Link to Folder in the file system > Browse > ..\LibST (Outside Project)
(FYI: right click properties > source path = shows as ${PARENT-1-PROJECT_LOC}\ShareA)
Happy Monday !?!?
Paul
