Commit Graph

93 Commits

Author SHA1 Message Date
Peter Dragun
e3198fff3c feat: Update esptool to v5 2025-09-30 15:28:55 +02:00
Roland Dobai
adb2d5deee feat(cmake): Produce warnings when component dependencies are not defined
There are idf.py hints for helping the user to set component
dependencies properly instead of building sources out-of-component or
including headers from outside the component directory. These are
produced with
tools/idf_py_actions/hint_modules/component_requirements.py.

However, idf.py hints are printed only when the build fails. If the user
starts with a buildable solution then the suggestions to add component
dependencies are not printed.

This commit introduces cmake-level warnings for building source files
from outside the component and including header files without setting up
proper component dependencies.
2025-09-24 13:43:23 +02:00
Roland Dobai
c3729929a8 change(tools): Fix pre-commit checks for test_components.py 2025-09-24 13:43:23 +02:00
Marek Fiala
96ff174dac feat(tools): idf.py extension - added interface version 2025-09-23 15:26:33 +08:00
Marek Fiala
74f75feb3a test(tools): Added idf extensions build system tests 2025-09-23 15:26:33 +08:00
Alexey Lapshin
2d12315b62 fix(tools): clean gdbinit files generation 2025-09-17 16:58:02 +08:00
Alexey Lapshin
612b5f88db fix(tools): apply pre-commit hook changes 2025-09-17 16:58:02 +08:00
Alexey Lapshin
9281e78381 change(esp_libc): rename newlib component to esp_libc 2025-09-09 22:00:44 +08:00
Alexey Lapshin
1275129a62 Merge branch 'fix/actulize_newlib_kconfig_variables' into 'master'
fix(config): actualize newlib Kcongig options

See merge request espressif/esp-idf!41301
2025-08-29 11:37:44 +04:00
Jakub Kocka
117919d7d6 Merge branch 'fix/click_version' into 'master'
Fixed click deprecation warnings

Closes IDF-13075 and IDF-13088

See merge request espressif/esp-idf!40765
2025-08-29 14:48:55 +08:00
Sudeep Mohanty
5eb8e746fc Merge branch 'fix/build_system_create_bin_gen_tgts' into 'master'
feat(build-system): Create build system hooks for post-elf processing

Closes IDFGH-16204

See merge request espressif/esp-idf!41097
2025-08-28 14:35:21 +02:00
Alexey Lapshin
28ced4efad fix(config): actualize newlib Kconfig options 2025-08-28 12:25:09 +08:00
Jakub Kocka
2affbb9509 refactor(tools): Updated tests to corespond with massage changes 2025-08-26 13:50:45 +02:00
Fu Hanxi
60e9ec429d fix: kconfig optional dependency in transitive dependency 2025-08-25 14:32:05 +02:00
Peter Dragun
eba6b814ba feat: Add support for esptool v5 and keep v4 for now 2025-08-21 15:53:39 +02:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Sudeep Mohanty
4cfc196680 feat(build-system): Create build system hooks for post-ELF processing
This commit adds new CMake APIs for the build system, viz.,
idf_build_add_post_elf_dependency() and
idf_build_get_post_elf_dependencies().
These APIs allow components to add post-ELF processing hooks before the
binary file is generated.

Closes https://github.com/espressif/esp-idf/issues/17251
2025-08-15 12:22:47 +02:00
Fu Hanxi
0d5b3e60ac ci: remove --enable-pytest from install.sh 2025-07-09 10:33:26 +02:00
Fu Hanxi
fc4b2fbc28 Merge branch 'ci/disable-plugin-idf_ci' into 'master'
ci: disable idf-ci plugin

See merge request espressif/esp-idf!39600
2025-06-04 12:12:18 +02:00
Fu Hanxi
9f4b9d815a feat: support kconfig in component manager 2025-06-03 08:43:09 +02:00
Fu Hanxi
87a5aedb85 ci: disable idf-ci plugin
this plugin will be re-enabled with compatible code in !38755
2025-06-03 08:37:56 +02:00
Jan Beran
c6a0d9118e change: Support misspelled Kconfig[.projbuild] file names
If the name is misspelled, CMake prints out a warning.
Original issue: https://github.com/espressif/esp-idf-kconfig/issues/14
2025-05-29 14:18:20 +02:00
Marek Fiala
1507ec7466 fix(test): Proper cleanup after build_custom_cmake pytest
The test create build folder in current directory which
in this case is defined by (test_app_copy).
It also creates sdkconfig file in cmake source directory, which
is defined as $IDF_PATH/examples/build_system/cmake/idf_as_lib

The fixtures ensures proper cleanup even when test fails.
2025-04-15 15:09:27 +02:00
Marek Fiala
58b3c60f59 fix(tools): Update ruff-format changes 2025-04-15 15:09:27 +02:00
Marek Fiala
87a118361f test(tools): skip custom cmake project test for host on Win 2025-04-15 15:09:27 +02:00
Peter Dragun
de6206ed3a ci: use ruff for formatting and linting all python files 2025-03-27 10:44:27 +01:00
Frantisek Hrbata
54cb6636ec ci: add idf_as_lib to patterns-build_system rules
The `idf_as_lib` example is used and tested in
`tools/test_build_system/test_cmake.py`. Include `idf_as_lib` in the
build_system rules to ensure the tests are executed whenever there is a
modification in the `idf_as_lib` example.

Expand the `test_build_custom_cmake_project` test to cover all supported
targets, including host build.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-02-25 08:54:02 +01:00
Frantisek Hrbata
c28b7dc9ac change(ci): disable MINIMAL_BUILD for test_build_cmake_library_psram_workaround
The test_build_cmake_library_psram_workaround verifies that the
mfix-esp32-psram-cache-issue flag is applied to all compile commands in
compile_commands.json when CONFIG_SPIRAM_CACHE_WORKAROUND=y. Although
the import_lib does not need the esp_psram component, this test does. To
avoid adding the esp_psram dependency to the import_lib, disable
MINIMAL_BUILD for this test by explicitly setting the COMPONENTS
variable.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-20 20:14:40 +01:00
Fu Hanxi
6ff7947fef feat: add component_source property to component targets 2024-09-30 18:14:04 +08:00
Roland Dobai
0b43a55625 Merge branch 'feat/update_tools_in_tools_json' into 'master'
feat(tools): Update tools: cmake, ninja, ccache

Closes IDF-10686 and IDFGH-13476

See merge request espressif/esp-idf!32726
2024-09-11 14:40:19 +08:00
Ivan Grokhotkov
f789b4eb45 Merge branch 'bugfix/build_test_better_errors' into 'master'
test(build_system): print failed command and output when test fails

See merge request espressif/esp-idf!32962
2024-09-10 15:18:41 +08:00
Marek Fiala
ccf5989505 feat(tools): Exclude modified folders by rebuild 2024-09-04 12:48:15 +02:00
Ivan Grokhotkov
5e9ac5bdf7 test(build_system): print failed command and output when test fails 2024-08-22 13:59:43 +02:00
Marek Fiala
364f777f96 feat(tools): Allow test_spaces_bundle4 to fail on Win 2024-08-21 14:37:06 +02:00
Marek Fiala
e95aff7ca9 feat(tools): sanitize all fixtures using test names
The parametrization include `[` and `]` in names. This is not
possible to use within path. Expand the sanitization into all
fixtures using request.node.name.
2024-08-21 14:37:06 +02:00
Marek Fiala
ccbb415be8 feat(tools): add pytest mark idf_copy_with_space 2024-08-21 14:37:05 +02:00
Marek Fiala
f0e8966ca5 feat(tools): Use custom directory in failing pytest 2024-08-21 14:37:05 +02:00
Ivan Grokhotkov
5ef75d5073 Merge branch 'bugfix/reproducible_builds_improvements' into 'master'
build system: reproducible build improvements

Closes IDFGH-12690

See merge request espressif/esp-idf!32734
2024-08-16 19:02:40 +08:00
Ivan Grokhotkov
cbc52e7d30 test(build_system): check reproducible builds with spaces in paths 2024-08-15 16:41:32 +02:00
Ivan Grokhotkov
bef4cb05ff fix(build_system): fix toolchain sysroot directory affecting builds
Closes https://github.com/espressif/esp-idf/issues/13680
2024-08-15 16:41:31 +02:00
Ivan Grokhotkov
c521fcb6fd fix(cmake): report correct error on unknown component name
Previously the error message was

CMake Error at /home/user/esp-idf/tools/cmake/build.cmake:296 (__component_get_property):
  __component_get_property Function invoked with incorrect arguments for
  function named: __component_get_property
Call Stack (most recent call first):
  /home/user/esp-idf/tools/cmake/build.cmake:341 (__build_resolve_and_add_req)
  /home/user/esp-idf/tools/cmake/build.cmake:638 (__build_expand_requirements)
  /home/user/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
  CMakeLists.txt:6 (project)

Now it will be:

CMake Error at /home/user/esp-idf/tools/cmake/build.cmake:298 (message):
  Failed to resolve component 'whatever' required by component 'main'.
Call Stack (most recent call first):
  /home/user/esp-idf/tools/cmake/build.cmake:345 (__build_resolve_and_add_req)
  /home/user/esp-idf/tools/cmake/build.cmake:642 (__build_expand_requirements)
  /home/user/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
  CMakeLists.txt:6 (project)

Also improved the hint to show the component name in quotes.
2024-08-12 17:54:44 +02:00
Ivan Grokhotkov
fc4c445643 test(build_system): move reproducible build test to pytest 2024-08-11 20:24:03 +02:00
Ivan Grokhotkov
d6edcba3b6 test(build_system): extract file helpers, add 'bin_files_differ'
- Move file-related functions bin_file_contains and file_contains
  from idf_utils.py and existing functions from editing.py into a new
  file file_utils.py
- Add a function 'bin_files_differ' to compare binary files
2024-08-11 20:23:27 +02:00
gojimmypi
f6a852e1cf fix(cmake): check for missing component_target
Closes https://github.com/espressif/esp-idf/pull/14036

[Frantisek Hrbata: fixed spelling not related to this change so spellcheck succeeds]
[Frantisek Hrbata: modified the error message to be recognized by the existing hint]
[Frantisek Hrbata: added also check in idf_component_set_property and simple tests]
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-07-11 18:33:41 +02:00
Jan Beran
950428c2f4 feat(tools): Add often used espefuse subcommands to idf.py 2024-06-07 16:23:17 +02:00
Frantisek Hrbata
fbe8bf89ee fix: properly resolve component dependencies
There is currently a bug in the __build_resolve_and_add_req function in
tools/cmake/build.cmake where the check for registered component
requirements is incorrectly applied to the component itself rather than
its dependencies. This issue likely originated from a typo, using
component_target instead of _component_target. To prevent further
confusion, _component_target has been renamed to _req_target.

Fixing this revealed multiple incorrect dependencies for the Linux
target, which have now been resolved by explicitly specifying the
dependencies for the Linux target.

Closes https://github.com/espressif/esp-idf/issues/13447

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-05-30 22:01:55 +08:00
Marek Fiala
e351a4407a fix(tools): fix failing create readonly project build system test
Changed the way of removing copied esp-idf folder.
2024-04-30 16:42:05 +02:00
Roland Dobai
af302c0bee Merge branch 'feat/add_merged_bin_cmd' into 'master'
feat(tools): Add idf.py merge-bin command and cmake target

See merge request espressif/esp-idf!29996
2024-04-22 17:55:36 +08:00
Fu Hanxi
2cde75b531 ci: improve pytest build system tests
- remove temp dirs
- remove idf-component-manager unit test
2024-04-16 15:33:43 +02:00
Fu Hanxi
a4f691b88a ci: always cleanup idf copy in ci 2024-04-16 15:32:10 +02:00