Move IDF project files into a subdir and recognize it in ESP-IDF extension

patkepa
Posts: 3
Joined: Tue May 13, 2025 3:02 pm

Move IDF project files into a subdir and recognize it in ESP-IDF extension

Postby patkepa » Tue May 13, 2025 3:17 pm

Hello,


I would like to change the structure of IDF project, which right now is the default one with:
- main
- CmakeLists.txt
- partitions.csv
- etc.
In the root of the repo. But I would like to change it, so my ESP IDF embedded code, is in subdirectory in the root of my repository, while still being able to build and flash my project using IDF Extension.

After trying to implement it, by putting IDF project into subfolder, and creating new CMakeLists.txt in the root of the repo, so our VS Code IDF extension sees it, I'm met with numerous toolchain errors, partial builds and so many issues.

I tried to fix it using Cmake syntax, but it seems there's something I'm missing.

Is there some official way of doing that? I tried to search in docs but I didn't find anything in particular.

tldr; trying to move IDF project from default structure, into one where embedded code resides in subdir of main project; numerous issues;

MicroController
Posts: 2685
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Move IDF project files into a subdir and recognize it in ESP-IDF extension

Postby MicroController » Wed May 14, 2025 8:20 am

my ESP IDF embedded code, is in subdirectory in the root of my repository
Seems like the subdirectory then is the root of the IDF project you'd want to open.

patkepa
Posts: 3
Joined: Tue May 13, 2025 3:02 pm

Re: Move IDF project files into a subdir and recognize it in ESP-IDF extension

Postby patkepa » Wed May 14, 2025 8:58 am

my ESP IDF embedded code, is in subdirectory in the root of my repository
Seems like the subdirectory then is the root of the IDF project you'd want to open.
Yes. But then the issue is that, when I load the project into VS Code, and the ESP IDF is inside of this subdirectory, the extension doesn't recognize this is a valid IDF project, so build fails.

Who is online

Users browsing this forum: Bytespider, Qwantbot, Semrush [Bot] and 3 guests