Recommended approach for duplicating projects with STM32 CubeID for VSCode v3.x
I'd like to clone an existing STM32 C project with CMake that I've previously setup. I've seen posts about how to do this on STM32CubeIDE but none using the VSCode extension.
Currently, I'm aware of 2 methods:
- Cloning `.ioc` file
- Clone the `.ioc` file into new folder with <New Project Name>.
- Find and replace any <Old Project Name> references with <New Project Name> in the `.ioc` file.
- Open the updated `.ioc` file in CubeMX and generate code.
- Copy over any user code from the original `main.c`.(a bit tedious depending on how much user code there is)
- Copy over any libraries and recreate any symlinks.
- Build project
- Copying the whole project folder and renaming
- Copy entire project folder and rename it.
- Find and replace all occurrences of <Old Project Name> with <New Project Name>.
- Try building and fix any errors that pop up.
Method 1 feels safer but is more tedious than method 2.
Is there a neater way to do this that doesn't involve manually replacing values? (i.e. without find and replace)
I also briefly recall seeing something about ST planning to add a 'Clone Project' feature to the next version of the extension but can't seem to find the post anymore.
Any pointers would be appreciated.
EDIT: Clarity
