After updating to ESP-IDF v5.4, the 'sample_project' template is missing when creating a new project in VS Code.

MrNando
Posts: 2
Joined: Thu Jan 23, 2025 10:37 am

After updating to ESP-IDF v5.4, the 'sample_project' template is missing when creating a new project in VS Code.

Postby MrNando » Fri Jan 24, 2025 8:47 am

Hello. I have an issue with the VS Code extension. Previously, I used version v4.4, and when creating a new project, I had the option to select "sample_project" as a template. Now I installed version v5.4, and that option is no longer available for creating a new project. If I choose one of the other options, I have to rename the files and adjust the CMake configuration, which is not a huge problem but is more inconvenient. Does anyone else have this issue with this version? How can it be solved?

FabricioESP
Posts: 2
Joined: Tue Nov 26, 2024 9:16 am

Re: After updating to ESP-IDF v5.4, the 'sample_project' template is missing when creating a new project in VS Code.

Postby FabricioESP » Tue Jan 28, 2025 10:09 am

Hi @MrNando thank you for bringing that to our attention.
Indeed the sample_project was moved from the examples to the templates folder in IDF v5.4. Unfortunately right now that folder is not exposed by VSCode ESP-IDF extension. I am logging this internally to have it addressed in a future release.

In the meantime you can follow the steps below to start a new project using the sample_project template:

1) Navigate to the IDF V5.4 installation folder (the default location is `~\.espressif\v5.4` or `<user>\esp\v5.4`) enter the folders `esp-idf/tools/templates`.
2) Copy the folder sample_project to your project destination folder and rename it to the name of your project.
3) Open VScode and open the folder you just created with the name of your project.
4) Using VSCode command pallet run the command "ESP-IDF: Add vscode Configuration Folder"
5) Using the command pallet or the status bar button run the command "ESP-IDF: Select Current ESP-IDF Version"
6) Using the command pallet or the status bar button run the command "ESP-IDF: Set Espressif Device Target"

This procedure will result in the same folder structure and configuration as before by selecting sample_project among the example templates.

Please feel free to reach out anytime if you need further assistance.

Fabricio

LorosColiman
Posts: 2
Joined: Sat Jan 25, 2025 6:05 pm

Re: After updating to ESP-IDF v5.4, the 'sample_project' template is missing when creating a new project in VS Code.

Postby LorosColiman » Wed Jan 29, 2025 9:01 pm

I tested the procedure that Fabricio suggested, and it works for me, hopefully they fix this soon since is a pain for new programmers like me.

MrNando
Posts: 2
Joined: Thu Jan 23, 2025 10:37 am

Re: After updating to ESP-IDF v5.4, the 'sample_project' template is missing when creating a new project in VS Code.

Postby MrNando » Fri Jan 31, 2025 10:26 am

It has also worked for me. Thank you very much for the response.

Who is online

Users browsing this forum: No registered users and 8 guests