2022-07-15 06: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
2022-07-15 07:42 AM
I use this steps , but in one workspace you an have only one named project .
2022-07-15 09: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
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?
Using: Win10, STM32CubeIDEv1.10.1B
Paul
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..
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.
2022-07-18 09: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.
(FYI: right click properties > source path = shows as ${PARENT-1-PROJECT_LOC}\ShareA)
Happy Monday !?!?
Paul