Build System V2 - Example Code?

burtrum
Posts: 23
Joined: Mon Dec 28, 2015 1:34 pm

Build System V2 - Example Code?

Postby burtrum » Thu Jan 15, 2026 12:15 am

Looking forward to the new Build System V2.
I could not find any updated Example Code using V2.
Please point to any examples or if none exist, I will open an issue requesting some V1 examples to be written with V2.

Burtrum

ESP_igrr
Posts: 2076
Joined: Tue Dec 01, 2015 8:37 am

Re: Build System V2 - Example Code?

Postby ESP_igrr » Thu Jan 15, 2026 8:20 am

Hi Burtrum,

Currently the only "buildv2" application in ESP-IDF is this test app: https://github.com/espressif/esp-idf/tr ... 2_test_app. It is very simple and doesn't show all the ways buildv2 can be used.
We have a task internally to add examples for buildv2, we will handle it in the near future.

frhr
Espressif staff
Espressif staff
Posts: 12
Joined: Tue Jan 10, 2023 10:41 am

Re: Build System V2 - Example Code?

Postby frhr » Thu Jan 15, 2026 8:58 am

Hello Burtrum,

as mentioned by Ivan, we will be adding the examples shortly. In the meantime, the basic concept with an example is described in the documentation here: https://docs.espressif.com/projects/esp ... em-v2.html. This might be useful until the examples are available. Thank you for your interest in the new build system.

burtrum
Posts: 23
Joined: Mon Dec 28, 2015 1:34 pm

Re: Build System V2 - Example Code?

Postby burtrum » Sat Jan 17, 2026 6:42 am

I have copied the example code and it failed to build. Latest IDF, target is esp32c6, Linux.
https://github.com/espressif/esp-idf/tr ... 2_test_app

I then make it as simple as possible (removed KConfig.projbuild) and it still failed. See Note below.
I have opened an issue.

The error:
components/esp_system/startup_funcs.c:33:10: fatal error: private/esp_coexist_internal.h: No such file or directory

The quick workaround is to disable Coexistence. It produces a clean build just for testing V2.

Code: Select all

idf.py menuconfig
Project configuration for components not included in the build  --->
     Wireless Coexistence  --->
	[*] Software controls WiFi/Bluetooth coexistence (default value)	FAILS

But:
	[ ] Software controls WiFi/Bluetooth coexistence (default value)	WORKS
Side Note:
With Build System V2 Kconfig.projbuild must be Upper-case K and the other letters lower-case.
I presume that the example's KConfig.projbuild is intentionally misspelled fort testing.

Burturm

burtrum
Posts: 23
Joined: Mon Dec 28, 2015 1:34 pm

Re: Build System V2 - Example Code?

Postby burtrum » Sat Jan 17, 2026 7:06 pm

I have learned that this is a problem with esp3c5 & esp32c6.
I have moved on to an esp32c3 and the build is without errors.
So, now the adventure begins...

ESP @fhrbata reply to Issue #18133

The problem is caused by the esp_system component’s use of the idf_component_optional_requires function, which is incompatible with cmakev2 and leads to build errors for esp32c5/esp32c6 targets.

Under the new build system, a component cannot be assumed to be included just because its configuration options are available. This behavior is explained in more detail https://docs.espressif.com/projects/esp ... 2.html#id9. We will need to update esp_system to handle these conditional dependencies correctly for cmakev2.

sudeep-mohanty
Posts: 8
Joined: Tue Aug 15, 2023 10:49 am

Re: Build System V2 - Example Code?

Postby sudeep-mohanty » Wed Mar 04, 2026 10:53 am

Hi,

We now have Build System v2 examples available for exploration:
https://github.com/espressif/esp-idf/tr ... m/cmakev2/

Please feel free to try them out and share any feedback, comments, or issues you encounter. Your input will help us improve the new build system.

Thank you!

Who is online

Users browsing this forum: Bytespider, Qwantbot and 8 guests