Postby OllieK » Fri Jan 22, 2021 2:32 am
I did check my versioning procedure with IDF 4.1/0.6.1
This is an example of the project version management based on the hello_world template
1. Prepare for ESP Projects
- Create a folder for your ESP Projects, such as C:\Users\name\Documents\ESP_Projects
- Create a folder for hello_world project, such as C:\Users\name\Documents\ESP_Projects\HelloWorldProject
2. Select a Template
- Open Command Palette (F1 or Ctrl-Shift-P), select ESP-IDF: Show Examples Projects
- In get-started, select hello_world, select Create project using example hello_world
- Save the project folder in C:\Users\name\Documents\ESP_Projects\HelloWorldProject
- Observe how the initial version is stored in C:\Users\name\Documents\ESP_Projects\HelloWorldProject\hello_world
3. Build, Flash, and Monitor that hello_world works OK
4. Create a folder for the new version
- Open C:\Users\name\Documents\ESP_Projects\HelloWorldProject
- Select hello_world folder and copy it
- Paste it in HelloWorldProject
- Change the folder name from hello_world - Copy to hello_world_V0_1
5. Prepare the new folder for VSC
- Open hello_world_V0_1\build
- Delete all folders and files in build folder
- Open C:\Users\name\Documents\ESP_Projects\HelloWorldProject\hello_world_V0_1\MakeFile with a text editor
- Change the PROJECT NAME from hello-world to hello_world_V0_1, save the file
- Open C:\Users\name\Documents\ESP_Projects\HelloWorldProject\hello_world_V0_1\CMakeLists.txt with a text editor
- Change the project from hello-world to hello_world_V0_1, save the file
6. Open the new version in VSC
- In File Menu, select open folder, select C:\Users\name\Documents\ESP_Projects\HelloWorldProject\hello_world_V0_1
- Notice that the project name is shown as HELLO_WORLD_V0_1
7. Build, Flash, and Monitor that hello_world_V0_1 works OK
8. Repeat the steps 4 - 6 for additional versions
After this, all the different versions of the project are in the same folder (HelloWorldProject). Let me know if you have any questions or comments.
PS. Sorry for my rambling about the absolute paths in the previous post. I didn't find any in the current VSC environment.