110 Commits

Author SHA1 Message Date
Sudeep Mohanty 1d56d59a82 ci(cmakev2): restore clang builds for import_lib example
The cmakev2/features/import_lib example now builds cleanly with
clang. Restore it to the supported target matrix and re-enable it
in CI.
2026-04-17 13:49:05 +02:00
Marius Vikhammer 8c16332fa4 ci(build_sys): disable import lib test app for cmake v2 2026-04-14 10:27:33 +08:00
Sudeep Mohanty e364a60769 test(cmakev2): add pytest scripts for cmakev2 build system examples
Add pytest test coverage for cmakev2 build system examples that had
none.

CMakeLists.txt fixes required to enable testing:

conditional_component and plugins: added idf_build_generate_flasher_args()
since these use the low-level build API (idf_build_executable /
idf_flash_binary) which unlike idf_project_default() does not call it
automatically. Without it, flasher_args.json was missing from the build
output and pytest-embedded could not initialize the DUT.

multi_binary: both app1 and app2 were registered in the global flash
target via idf_flash_binary(...FLASH), creating a duplicate key at offset
0x10000 in the flasher_args.json generator expression and preventing the
file from being generated. Fixed by removing FLASH from app2's call so
only app1 is registered in the global flash target. idf_build_generate_flasher_args()
now produces a valid flasher_args.json with app1 as the default app binary.
The test patches the binary path to app2.bin when testing the second app.
2026-04-10 13:49:56 +02:00
Fu Hanxi ddc7e0cdf7 ci: move qemu test cli args alongside test scripts
remove redundant host_test marker
2026-03-26 10:56:15 +01:00
Sudeep Mohanty afe4bae9dd change(cmakev2-examples): Update README file for cmakev2 examples 2026-02-24 11:21:20 +01:00
Sudeep Mohanty c735d9beb9 feat(cmakev2): Added import_lib_direct example for cmakev2
This commit adds a new example at
examples/build_system/cmakev2/features/import_lib_direct to
demonstrate the cmakev2 ability to integrate with external CMake
projects easily.
2026-02-24 11:21:20 +01:00
Sudeep Mohanty fa57ea1a10 feat(cmakev2): Added multi_binary example for cmakev2
This commit adds a new example at
examples/build_system/cmakev2/features/multi_binary to
demonstrate the cmakev2 ability to build multiple binaries in a single
CMake project.
2026-02-24 11:21:20 +01:00
Sudeep Mohanty 390ce6a832 feat(cmakev2): Added conditional_component example for cmakev2
This commit adds a new example at
examples/build_system/cmakev2/features/conditional_components to
demonstrate the cmakev2 ability to conditionally include components in
the build based on Kconfig options.
2026-02-24 11:21:20 +01:00
Sudeep Mohanty 249f3b167f feat(cmakev2): Added plugins example for cmakev2
This commit updates the examples/build_system/cmake/plugins
example for the new build system and adds the newly created example at
examples/build_system/cmakev2/features/plugins.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty 1580f7695b feat(cmakev2): Added multi_config example for cmakev2
This commit updates the examples/build_system/cmake/multi_config
example for the new build system and adds the newly created example at
examples/build_system/cmakev2/features/multi_config.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty d9aa6adbfc feat(cmakev2): Added import_prebuilt example for cmakev2
This commit updates the examples/build_system/cmake/import_prebuilt
example for the new build system and adds the newly created example at
examples/build_system/cmakev2/features/import_prebuilt.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty 5d7fdc7c78 feat(cmakev2): Added import_lib example for cmakev2
This commit updates the examples/build_system/cmake/import_lib
example for the new build system and adds the newly created example at
examples/build_system/cmakev2/features/import_lib.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty 8a1d5f98f9 feat(cmakev2): Added component_manager example for cmakev2
This commit updates the examples/build_system/cmake/component_manager
example for the new build system and adds the newly created example at
examples/build_system/cmakev2/features/component_manager.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty db33ccc5c1 feat(cmakev2): Added idf_as_lib example for cmakev2
This commit updates the examples/build_system/cmake/idf_as_lib
example for the new build system and adds the newly created example at
examples/build_system/cmakev2/features/idf_as_lib.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty ce6f14bdd6 feat(cmakev2): Added README file for cmakev2 examples folder 2026-02-24 11:21:19 +01:00
Sudeep Mohanty 58a89c97eb feat(cmakev2): Added hello_world example for cmakev2
This commit updates the examples/get-started/hello_world example for the
new build system and adds the newly created example at
examples/build_system/cmakev2/get_started/hello_world.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty 1292047b4f fix(build_system): Removed use of legacy IDFTOOL variable
This commit removes the IDFTOOL CMake variable from the build system.
2026-01-30 09:29:20 +01:00
C.S.M f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Alexey Lapshin 583a9075fa fix(test): fix tests according to the new toolchain flags 2025-11-14 21:04:58 +07:00
Marek Fiala 1e351a8b67 test(tools): Moved preset parsing into core_ext.py and added tests 2025-10-29 11:47:40 +08:00
Ivan Grokhotkov 78ae7ab085 feat(build): add idf.py support for CMake configuration presets
This commit adds a new idf.py --preset NAME argument, which allows
selecting the CMake configuration preset with a given name.
For idf.py, selecting the preset does two things:
- sets the build directory, which is specified in the preset itself
  using "binaryDir" field
- passes --preset argument to CMake configuration phase

The multi_config example is updated to illustrate how this feature is
expected to be used.
2025-10-29 11:47:40 +08:00
Peter Dragun e3198fff3c feat: Update esptool to v5 2025-09-30 15:28:55 +02:00
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Alexey Lapshin 019dc93ae0 feat(esp_system): switch to standard __libc_init_array initialization
Initially, ESP-IDF used the do_global_ctors() function to run global
constructors. This was done to accommodate Xtensa targets that emit
.ctors.* sections, which are ordered in descending order.

For RISC-V, compilation used .init_array.* sections, which are designed
to have ascending order. Priority constructors in .init_array.* sections
were correctly processed in ascending order. However, non-priority
.init_array section was processed in descending order, as it was done
for Xtensa .ctors.

Starting with ESP-IDF v6.0, the implementation switched to the standard
LibC behavior (__libc_init_array()), which processes both priority and
non-priority constructors in ascending order.

To achieve this, a breaking changes were introduced:
  - Xtensa .ctors.* priority entries converted to .init_array.* format
    (ascending), to be passed to __libc_init_array().
  - Processing order of non-priority .init_array and .ctors sections was
    changed from descending to ascending.

Also, this change introduces .preinit_array for linking. This may be
needed for some C++ or sanitizer features.

Related to https://github.com/espressif/esp-idf/issues/15529
2025-08-04 11:33:44 +08:00
Chen Jichang c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
igor.udot daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Darian Leung 3b28818ba4 fix(examples): idf_as_lib linux build
The Linux build was broken after IDF flash API was updated without updating
the Linux stub library in the example. This commit updates the spi_flash stub
library such that:

- The API now matches same API as IDF's spi_flash component
- Links the stub_esp32 library to pull in basic types and defines
2025-02-19 18:41:05 +08:00
Darian Leung 0b6922405d fix(examples): idf_as_lib move flash_ops.c to spi_flash stub library
Example linux build of the example demonstrates "esp32" and "spi_flash" stub
libraries (roughly analogous to "esp_system" and "spi_flash" components).

This commit moves the "flash_ops.c" file to the "spi_flash" stub library as it
is a flash related funciton.

Also renamed the header to "esp_flash.h" (in order to match current header name
in IDF). This is a prerequisite to fixing the linux build of this example.
2025-02-19 18:41:05 +08:00
Darian Leung 5301eaf0d8 fix(examples): Fix idf_as_lib for esp32p4
The build-esp32p4.sh and run-esp32p4.sh scripts are not symbolic links to the
base scripts, leading to a "permission denied" error. This commit changes their
types to symbolic links, in line with the other targets.
2025-02-19 18:39:18 +08:00
gaoxu 5ef4f20778 feat(esp32h21): disable unsupported build test 2025-02-06 15:47:51 +08:00
Frantisek Hrbata c368f15328 feat(examples): trim down the plugins example build
Set the COMPONENTS project variable to streamline the build process.
Although the minimal build feature could be used to specify plugin
components in the main component dependencies, it's more convenient to
set the plugin components at the project level. This approach also
allows for quick selection of which plugins to include in the
application.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-01-06 19:23:42 +01:00
Alexey Lapshin 888b5f7e8d feat(newlib): add picolibc support 2024-12-02 21:35:56 +07:00
Frantisek Hrbata 1c92945f59 change(examples): switch examples to use a minimal build
Currently, several example dependencies rely on the fact that all
registered components are added to the build, along with components
specified in common requirements. This results in longer build times
because even unused components must be built. Switch all examples to use
idf_minimal_build to compile only the components actually required by
the example.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-20 20:14:40 +01:00
Daniel Paul 658b1de02c docs: Consistent naming convention for ESP Component Registry 2024-07-23 14:10:34 +08:00
wanlei 3cf069c7d8 feat(esp32c61): disable unsupported build test 2024-07-16 16:06:19 +08:00
laokaiyao 65b1fd33d3 ci(esp32c5mp): disable the unsupported tests 2024-04-07 12:13:29 +08:00
Xiao Xufeng 313c4f2cdc fix(all): remove unused header includes 2024-03-25 13:58:40 +08:00
Fu Hanxi c1301c6145 build: bypass build issues 2024-01-10 15:34:50 +01:00
Marius Vikhammer 97b52f2cfb ci(build_system): clean-up cmake examples build-test-rules.yml 2024-01-04 11:30:41 +08:00
Armando 3c5a4f9e8a ci(p4): added todo jira for disabled tests on p4 2024-01-04 09:36:38 +08:00
Armando 1ab742b3c3 ci(p4): enable esp32p4 target test 2024-01-04 09:34:55 +08:00
Marius Vikhammer d9652880db fix(build-system/example): Updated dead URL for downloading tinyxml2
The import_lib example contained a fallback mirror for downloading tinyxml2 sources
but this link was dead. If this mirror was used it would cause the build to fail.
2023-12-04 14:28:52 +08:00
Marek Fiala b39e541652 feat(tools): Do not run test_create_project_with_idf_readonly on macOS
It corrupts environment on macOS runner because it uses shell, not docker-executor,
and makes all tree read-only for a non-root user.

+ Replace examples with real files in example README.md
2023-08-31 12:54:19 +02:00
Armando 7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
Armando (Dou Yiwen) 337aeb4b78 Merge branch 'feature/add_esp32p4_hello_world' into 'master'
esp32p4: introduced new chip ESP32P4: Hello World! 🌏

Closes IDF-7523

See merge request espressif/esp-idf!25013
2023-08-10 16:04:55 +08:00
Marek Fiala 13a26e56e1 feat(tools): idf.py adding arguments from file via @filename.txt - readme update 2023-08-09 13:47:25 +02:00
Armando 5bd644942a feat(esp32p4): base idf_as_lib support 2023-08-09 19:33:36 +08:00
laokaiyao 1f84f6c6ed esp32h4: remove esp32h4 target from ci 2023-04-20 15:19:47 +08:00
Peter Dragun 3e3533f918 feat(idf_monitor): move idf_monitor to separate repo 2023-02-03 11:20:15 +01:00
Cao Sen Miao 94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00