Commit Graph

7346 Commits

Author SHA1 Message Date
Sudeep Mohanty 5b0d81bc50 feat(cmakev2): Add dfu target support for cmakev2
This commit adds support for dfu targets for cmake2. The following
changes have been made:
- Adds a new tools/cmakev2/dfu.cmake file on similar lines as the
  tools/cmake/dfu.cmake file.
- Adds the idf_create_dfu() function to create the dfu targets. This
  function now takes the executable as an argument thus allowing the dfu
  target to be created per-executable.
- idf_project_default() is updated to create the dfu target.
2025-11-18 15:08:12 +05:30
Roland Dobai a295be6658 Merge branch 'feat/ldgen_fast_reflashing' into 'master'
feat(ldgen): initial support for fast reflashing

Closes IDF-14213

See merge request espressif/esp-idf!42780
2025-11-18 10:28:49 +01:00
C.S.M 961bd0cf78 Merge branch 'feat/introduce_esp32s31' into 'master'
feat(esp32s31): Introduce new target esp32s31

See merge request espressif/esp-idf!43316
2025-11-18 15:55:16 +08:00
laokaiyao e8f39b4c8d feat(hal): graudate the I2S hal driver into a new component 2025-11-18 15:47:16 +08:00
Sudeep Mohanty f72292b0d7 test(cmakev2): Enable test_rebuild.py for buildv2 CI tests
The test_rebuild_no_changes test verifies that running idf.py build
successively without any file changes results in identical build
artifacts on the second run (i.e., nothing gets rebuilt).

This test was failing in buildv2 because it expected kconfig_menus.json
to be present in build/config/ after a normal build. However, in
cmakev2, kconfig_menus.json is not generated during regular builds.

In cmakev1, kconfig_menus.json was generated globally during every
build alongside other config files (sdkconfig.h, sdkconfig.cmake, etc).

In cmakev2, kconfig_menus.json generation does not happend for
normal builds because it depends on the Kconfig menu hierarchy
and cannot be generated globally. It must be generated per-executable.

Hence, this commit updates the artefacts list for cmakev2 to not expect
the kconfig_menus.json file during a build/re-build action.
2025-11-18 10:12:12 +05:30
morris aa1fd9c611 refactor: avoid function calls inside MIN/MAX macros 2025-11-17 22:17:54 +08:00
C.S.M a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
armando b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +08:00
armando a4821ab7f5 ci(p4): re-enable p4 jobs 2025-11-17 12:11:39 +08:00
Alexey Lapshin 8b1bb83af7 Merge branch 'feature/dynamic_flags_in_toolchain_cmake' into 'master'
feat(build): propagate compiler flags from files to toolchain.cmake

Closes IDF-11323

See merge request espressif/esp-idf!42966
2025-11-17 07:52:41 +04:00
Aleksei Apaseev fb1fae9627 ci: add generate metrics of the target examples count 2025-11-17 08:28:42 +08:00
Alexey Lapshin 583a9075fa fix(test): fix tests according to the new toolchain flags 2025-11-14 21:04:58 +07:00
Alexey Lapshin 0c1d917f78 feat(build): propagate compiler flags from files to toolchain.cmake
This change improves build consistency across external projects integrated
through CMake by ensuring that compiler flags defined in configuration files
are passed correctly to the toolchain. It covers the majority of use cases,
as external projects are typically also CMake-based. For projects that use
a custom build system, users will still need to specify the required flags
manually.
2025-11-14 21:04:54 +07:00
Frantisek Hrbata 368e55a7bc fix(ldgen): use format specifiers instead of percent format
Resolve ruff's UP031 errors related to the use of percent formatting for
strings.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Frantisek Hrbata e65807a901 fix(ldgen): ruff formating changes and copyright update
Changes generated by pre-commit related to ruff-format and an update to
the copyright date.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Frantisek Hrbata 1eceeaace2 feat(build): provide ldgen with a list of mutable libraries
The build system keeps track of each component source. Currently
there are four types of sources:

1. "project_components" - project components
2. "project_extra_components" - components from EXTRA_COMPONENT_DIRS
3. "project_managed_components" - custom project dependencies managed by the IDF Component Manager
4. "idf_components" - ESP-IDF built-in components, typically under /components

This can be used to identify the component libraries that are likely to
change during application development and pass them to ldgen as mutable
libraries. Add all components with "project_components" as their source
as mutable.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Frantisek Hrbata 8ac9e65f4f feat(ldgen): print entity tree in debug mode
Add the `--debug` option to print the entity tree to stdout. This can be
useful for viewing the entire entity tree state to identify potential
issues or incorrect placements.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Frantisek Hrbata 3d081f0e23 fix(ldgen/test): ruff formating changes and long lines
Changes generated by pre-commit related to ruff-format and fixed long
lines.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Frantisek Hrbata 61193678e5 feat(ldgen/test): add test class for mutable libraries
Add basis tests for mutable libraries.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Frantisek Hrbata 299e172fca feat(ldgen): place input sections from mutable libraries into mutable markers
Introduce a new `--mutable-libraries-file` option that accepts a file
containing the filenames of mutable libraries, each listed on a separate
line. Mutable libraries are component libraries expected to change
during development. In contrast, immutable component libraries are not
expected to change. In the generated linker script, the input sections
of mutable libraries are grouped together rather than being mixed with
those of immutable libraries. The goal is to create large continuous
areas in the ELF file's output sections that remain unchanged for
immutable libraries during application recompilation, allowing these
areas to be skipped during flashing.

The build system identifies the mutable libraries and passes them to
ldgen using the `--mutable-libraries-file` option. It maintains
information about component sources, one of which is
`project_components`. This source type identifies components that are
directly related to the project being developed and are very likely to
change.

Mappings for mutable libraries are explicitly created for all sections
in the default scheme. This happens before the entity
`(archive:object_file:symbol/input_section)` node tree with placements is
generated and is equivalent to having these mappings in the mapping
linker fragment. All placements for mappings, whether newly added or
already existing as defined in linker fragments, associated with mutable
libraries are flagged as `mutable` in the entity node tree. This flag
ensures that these placements are included in the final linker script.
Currently, ldgen only emits placements that are either significant or
forced. A placement is considered significant if, for example, it is not
already covered by a placement in parent node. For instance, `*(.iram1
.iram1.*)` placement already includes `*libapp_trace.a:(.iram1
.iram1.*)`, so the latter is not emitted by default. The `mutable` flag
ensures that placements for mutable libraries are emitted in the linker
script and placed at dedicated location.

The locations where placements for mutable libraries are specified in
the linker script are identified by a new `mutable` marker, for example,
`mutable[flash_text]`. The placements for immutable libraries remain in
the existing `mapping` marker, for example, `mapping[flash_text]`. The
`mutable` marker for each target is placed after the `mapping` marker.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-13 15:30:42 +01:00
Jiang Jiang Jian 388ec4cd6d Merge branch 'ci/rename_wifi_two_duts' into 'master'
ci: rename wifi_two_dut to two_duts

See merge request espressif/esp-idf!43269
2025-11-13 16:54:51 +08:00
Harshal Patil 0debe71b3d Merge branch 'feat/flash_enc_using_key_manager' into 'master'
Support Flash Encryption using Key Manager

Closes IDF-13462 and IDF-14278

See merge request espressif/esp-idf!41879
2025-11-13 07:55:15 +05:30
Chen Yudong d591aaf1ae ci: rename wifi_two_dut to two_duts 2025-11-12 10:05:07 +08:00
Euripedes Rocha Filho 448714b056 remove(mqtt): Moves esp-mqtt to component manager
esp-mqtt is now a managed component at espressif/mqtt
2025-11-11 09:21:37 +01:00
harshal.patil 8abea3c537 feat(bootloader_support): Support Flash Encryption using Key Manager 2025-11-11 12:23:25 +05:30
Harshal Patil ed57a94687 Merge branch 'feat/extend_pmp_protection_esp32p4_eco5' into 'master'
Extend PMP memprot for ESP32-P4 V3

Closes IDF-14075

See merge request espressif/esp-idf!42402
2025-11-11 10:07:21 +05:30
Erhan Kurubas 08cf6c1a40 Merge branch 'move_sysview_to_component_registry' into 'master'
Move sysview to component registry

Closes IDF-13403 and DOC-12867

See merge request espressif/esp-idf!43011
2025-11-10 19:19:17 +01:00
Erhan Kurubas 79cda70029 change(app_trace): move sysview to component registry 2025-11-10 15:55:41 +08:00
Song Ruo Jing 4b8633cc2b refactor(rom/gpio): add 'rom_' prefix to GPIO ROM functions 2025-11-07 15:26:52 +08:00
David Čermák 27baa4a261 Merge branch 'fix/ci_netif_deps' into 'master'
[esp-netif]: Improve CI builds of netif tests

See merge request espressif/esp-idf!43136
2025-11-06 14:18:44 +08:00
Fu Hanxi cc72cf9953 Merge branch 'ci/enable-junit-report-in-mr' into 'master'
ci: enable junit report in MR

See merge request espressif/esp-idf!42925
2025-11-06 03:32:19 +01:00
David Cermak 4f8aa980be fix(ci): Refine depends pattern for netif test apps 2025-11-05 10:41:24 +01:00
Marius Vikhammer 02ff6e9656 test(netif): fixed protocols test-apps building for unrelated comp. changes 2025-11-05 10:40:39 +01:00
Frantisek Hrbata 1a9d0ce3f5 ci(pre-commit): exclude buildv2_test_app from check-readmes
The `tools/test_build_system/buildv2_test_app` is a cmakev2 build system
testing application, same as `build_test_app`, which should be removed
from the readme check performed by check_build_test_rules.py.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-05 10:21:52 +01:00
Fu Hanxi 2160ce6c56 ci: remove generate pytest report job
this is a temp workaround, since the current job takes too much time.
should replace it a new implementation
2025-11-05 10:17:14 +01:00
Roland Dobai d1b91b79b5 Merge branch 'fix/cmakev2_fixes' into 'master'
fix(cmakev2): sync with cmakev1 changes

See merge request espressif/esp-idf!43095
2025-11-05 09:51:30 +01:00
sonika.rathi 6216b017f0 feat(vfs): add 'fatfs' host test to include 'vfs' support 2025-11-05 09:49:21 +01:00
harshal.patil c66ef46f99 feat(cpu_region_protect): Extend PMP memprot for ESP32-P4 V3 2025-11-05 13:34:47 +05:30
Armando (Dou Yiwen) 6c8e58b388 Merge branch 'feat/p4_eco5_target_test' into 'master'
esp32p4: temporarily disable target test

Closes CII-17

See merge request espressif/esp-idf!42603
2025-11-05 01:32:16 +00:00
Frantisek Hrbata 999cc27599 feat(cmakev2/project): add warning for usage of deprecated variables
The COMPONENTS and EXCLUDE_COMPONENTS variables are unused in cmakev2. A
deprecation warning will be printed if they are set. This change also
includes a helper functions for printing deprecation warnings.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 14:38:13 +01:00
Frantisek Hrbata de5ad78f6b fix(cmakev2/project): drop prefix_map_gdbinit in favor of gdbinit/prefix_map
The cmakev1 dropped generation of prefix_map_gdbinit, reflect this
change also in cmakev2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 12:08:50 +01:00
Frantisek Hrbata 37efbf8675 fix(cmakev2/project): bump C and CXX standard
The cmakev1 bumped C and CXX standard to gnu23 and gnu++26, do the same
in cmakev2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 11:10:02 +01:00
Frantisek Hrbata c98146a8c6 fix(cmakev2/compat): add esp_stdio to common requires
The cmakev1 added esp_stdio to common requires, add it in cmakev2 too
for backward compatibility.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 11:06:02 +01:00
Roland Dobai a0b589c147 Merge branch 'feat/cmakev2' into 'master'
feat(cmakev2): introduce cmake-based build system v2

See merge request espressif/esp-idf!42691
2025-11-04 02:53:36 +01:00
Roland Dobai a6396a5387 Merge branch 'feature/cmake_presets' into 'master'
feat(tools): add idf.py support for CMake configuration presets

Closes IDF-13090, IDF-9350, and DOC-12674

See merge request espressif/esp-idf!40552
2025-11-03 17:15:46 +01:00
igor.udot 824c7f7320 ci: extend wildcard support for no_runner_tags 2025-11-03 02:48:04 +00:00
igor.udot 7a411e8a1b ci: extend wildcard support for EXCLUDE_RUNNER_TAGS 2025-11-03 02:48:04 +00:00
armando 2c9c5c66c8 change(ci): temporarily disable p4 target test 2025-11-03 02:48:04 +00:00
morris 0332719183 Merge branch 'refactor/remove_twai_errata_config' into 'master'
refactor(driver_twai): remove twai errata config

Closes IDF-13623 and IDF-13002

See merge request espressif/esp-idf!42850
2025-11-03 10:28:29 +08:00
Erhan Kurubas 1dac8685db feat(tracing): add new component for tracing 2025-10-30 12:15:35 +01:00