ESP-IDF as submodule in project structuring?

Bryght-Richard
Posts: 98
Joined: Thu Feb 22, 2024 3:59 pm

ESP-IDF as submodule in project structuring?

Postby Bryght-Richard » Fri Nov 14, 2025 5:47 pm

For context, Espressif usually installs the ESP-IDF in a system-wide location, like `C:\Espressif\frameworks\esp-idf-v5.y.z\`, and then projects anywhere can be configured to use it. This also hooks up a bunch of other stuff like ESP-IDF CMD and tells VS-Code where to find the ESP-IDF.

We've had to fork ESP-IDF to fix a few bugs, so we added our own git remote and some tags like ${PRODUCT_NAME}_${PRODUCT_MAJOR}.${PRODUCT_MINOR}.${PRODUCT_MICRO}. This works well enough, but it's annoying because to get a reproducible build we have to ensure the ESP-IDF commit and product commit are synchronized before building a release.

I was considering moving the ESP-IDF sources as a submodule inside the project repository. This would allow the project repository to specific a specific commit, and git would tell us if it wasn't correct. I've done this before with other RTOS platforms, but never something with as much host-OS integration as ESP-IDF. Has anyone tried this? Did you run into any troubles?


Thank you for your thoughts.

Bryght-Richard
Posts: 98
Joined: Thu Feb 22, 2024 3:59 pm

Re: ESP-IDF as submodule in project structuring?

Postby Bryght-Richard » Thu Nov 20, 2025 8:12 pm

Seems ESP-ADF works this way.

boarchuz
Posts: 656
Joined: Tue Aug 21, 2018 5:28 am

Re: ESP-IDF as submodule in project structuring?

Postby boarchuz » Thu Nov 20, 2025 11:41 pm

I do this with almost all of my ESP32 projects. Never had any issues. I point the VS Code extension at the directory (.esp-idf) and I'm off to the races. I still use the common "tools" path as I very rarely go breaking things in there.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], ChatGPT-User and 10 guests