554 Commits

Author SHA1 Message Date
Marius Vikhammer
d46b4fbfcf fix(linux_target): fixed TEST_COMPONENTS not working on macOS for linux target
Closes https://github.com/espressif/esp-idf/issues/15490
2025-03-03 16:42:18 +08:00
Frantisek Hrbata
9eb6f68454 fix(build): include test components in the minimal build
When minimal build is enabled, it only includes the main component and
its dependencies. This leads to test components specified through
TEST_COMPONENTS being ignored, meaning no tests are executed. The issue
arises because test components are also checked against the COMPONENTS
variable, and if they aren't listed there, they are disregarded.  To fix
this, explicitly add TEST_COMPONENTS to COMPONENTS when the minimal
build is enabled.

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

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-02-28 12:42:14 +01:00
Chen Jichang
6f83f39dce feat(esp32h4): introduce target esp32h4(stage 1) 2025-02-08 17:07:44 +08:00
Erhan Kurubas
d195bc67cf change(cmake): use board configuration file for ftdi interface 2024-12-04 22:10:25 +01:00
Alexey Lapshin
888b5f7e8d feat(newlib): add picolibc support 2024-12-02 21:35:56 +07:00
Laukik Hase
420810ee77
feat(esp_tee): Support for ESP-TEE - tools directory 2024-12-02 12:20:05 +05:30
Frantisek Hrbata
da1a99d5ed change(conf): add MINIMAL_BUILD note to menuconfig and sdkconfig
With MINIMAL_BUILD enabled, menuconfig will only display configuration
options for components included in the build through main component
dependencies. This means that configuration options for excluded
components will not appear in menuconfig. This might be confusing, as
most examples currently do not use a trimmed build, and all components
detected by the build system are available in menuconfig, even if their
configuration has no effect because the components may not be linked or
used. Adding a note in the components menu of menuconfig could help
users realize they need to add a component to the main component
requirements to see its configuration options. Unfortunately, Kconfig
does not support multiline comments, so there are three separate
comments intended to adequately describe the potentially missing
component configurations.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-20 20:14:40 +01:00
Frantisek Hrbata
f6fcfbb9e6 feat(cmake): introduce MINIMAL_BUILD build property
Introduce a MINIMAL_BUILD property to streamline the build process by
including only the main component and its direct and indirect
dependencies. This serves as a convenient shortcut for using
set(COMPONENTS main). The MINIMAL_BUILD build property is ignored if the
COMPONENTS variable is defined, as COMPONENTS takes precedence.

To enable a minimal build, add "idf_build_set_property(MINIMAL_BUILD ON)"
to the project's CMake configuration.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-20 14:11:24 +01:00
Alexey Lapshin
48a49c8154 feat(debugging): move gdbinit generation to CMake
This feature is useful for 3rd-party software to run GDB with predefined
options that described in project_description.json file

allow to pass custom options to "idf.py gdb":

  --gdb-commands: command line arguments for gdb. (without changes)
  -ex: pass command to gdb.
  -x: pass gdbinit file to gdb. Alias for old --gdbinit command
2024-11-19 16:41:38 +07:00
Gao Xu
bbcfb35d67 Merge branch 'feat/h21_introduce_step1_target' into 'master'
feat(esp32h21): introduce target esp32h21 (stage 1/8) 😐

See merge request espressif/esp-idf!34542
2024-11-14 10:46:44 +08:00
Roland Dobai
542a5d280c Merge branch 'contrib/github_pr_14733' into 'master'
fix(cmake): Prevent overwriting of component properties in output file (GitHub PR)

Closes IDFGH-13891

See merge request espressif/esp-idf!34807
2024-11-12 22:48:54 +08:00
gaoxu
64bbb53b8f feat(esp32h21): introduce target esp32h21(stage 1) 2024-11-12 15:42:27 +08:00
Frantisek Hrbata
798d35b2e1 feat(tools): unify sections in idf.py size reports for NG version
By default, esp-idf-size.ng displays all sections individually. This can
be confusing, especially if CONFIG_SOC_MEM_NON_CONTIGUOUS_SRAM is
enabled, resulting in sections like .dram0.data and .dram1.data being
abbreviated as two .data sections in the size report. To avoid confusion
for idf.py and cmake users, pass the --unify option to the underlying
esp_idf_size.ng by default.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-08 15:44:19 +01:00
Ivan Grokhotkov
d998d76627
change(version): Update version to v5.5-dev 2024-10-28 10:17:21 +01:00
Laukik Hase
5328dcd00c
change(build): Add a new CMake flag NON_OS_BUILD for non-FreeRTOS builds 2024-10-21 19:03:30 +05:30
viayie
bdf0821f97 fix(cmake): Prevent overwriting of component properties in output file
While 'component_properties_text'
correctly accumulated properties from all processed components, each
iteration of the loop was overwriting the entire file content.

Move the file(WRITE ...) call outside the loop to ensure all accumulated
component properties are written once, preserving information for all
components.
2024-10-16 14:11:23 +08:00
Nebojša Cvetković
8c1ecc4d94 build: Reduce verbosity of disabled component manager warning
closes https://github.com/espressif/esp-idf/pull/14097
2024-10-02 20:52:00 +08:00
Roland Dobai
1143b7639f Merge branch 'fix/idfpy_uf2_fail' into 'master'
fix(uf2): Ignore ESPBAUD, ESPPORT when calling idf.py uf2[-app]

Closes IDF-10768

See merge request espressif/esp-idf!33086
2024-10-01 17:12:29 +08:00
Fu Hanxi
6ff7947fef feat: add component_source property to component targets 2024-09-30 18:14:04 +08:00
Jan Beran
d77d1f5a95 fix(uf2): Ignore ESPBAUD, ESPPORT when calling idf.py uf2[-app] 2024-09-23 15:48:59 +02:00
Alexey Lapshin
0fb74b17ab Merge branch 'fix/kconfig-option-orphan_sections_warning' into 'master'
fix(build): fix orphan sections warning kconfig variable

See merge request espressif/esp-idf!32765
2024-09-22 21:57:12 +08:00
Alexey Gerenkov
b8d23b334b change(build): Enable 'xesppie' for esp32p4 Clang builds 2024-09-18 21:40:39 +03:00
Alexey Gerenkov
9ca231e76e change(build): Use integrated assembler with Clang for RISCV chips 2024-09-18 21:40:39 +03:00
Alexey Lapshin
64f9917dde fix(build): fix orphan sections warning kconfig variable 2024-08-20 20:07:32 +08: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
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
1c343d8923
change(build_system): refactor reproducible build handling
- remove generate_debug_prefix_map.py, move its logic into CMake
- move all reproducible builds logic into a new file, prefix_map.cmake
2024-08-12 13:26:33 +02:00
Alexey Lapshin
1608b4cde4 fix(build): fix error message for absent component 2024-08-01 12:34:13 +07: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
Konstantin Kondrashov
e596cb5527 feat(tool): Adds idf_build_remove_options_from_property func 2024-06-20 14:43:26 +08:00
Marc Finet
9456c157ff feat(build): Add config to disable warn be considered as errors
The -Werror=all activates error for all warnings in -Wall, however, it
does not activate error for other default warnings, such as:
- int-conversion (pointer from integer w/o a cast)
- incompatible-pointer-types
- discarded-qualifiers

Which are IMO even more important that -Wall.

This commit fixes that by activating error for all warnings (i.e. from
-Wall and default ones) and removing those from -Wextra, as the culprit
commit seemed to address.

Fixes: 60f29236f6 "Build system: Raise warning level" (2016-11-16)

In order to avoid long analysis during esp-idf upgrade, provide a way to
restore the previous -Werror=all behavior that consider only warnings
from -Wall (and not default ones).

Also add a hint to use the Kconfig option on compilation error, but warn
that fixing the code is the preferred way.

Merges https://github.com/espressif/esp-idf/pull/11239

Suggested-By: Ivan Grokhotkov <ivan@espressif.com>
2024-06-20 14:43:26 +08: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
Frantisek Hrbata
6f41dee0cd feat: add diff option support to idf.py size commands
This adds a possibility to specify --diff option to idf.py size,
size-components and size-files commands. This can be map file directly,
project directory or build directory.

Usage example:
idf.py size-components --diff ../hello_world2/build/hello_world.map
idf.py size-components --diff ../hello_world2/build
idf.py size-components --diff ../hello_world2

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-05-24 15:19:37 +08:00
Alexey Lapshin
2b36636f6f fix(system): print warning if stray section is found while linking 2024-05-17 13:37:42 +04:00
Alexey Gerenkov
57f61d2311 feat(tools): Update Clang version to esp-17.0.1_20240419 2024-05-03 16:55:13 +03:00
Ivan Grokhotkov
0436d49815
change(version): Update version to v5.4-dev 2024-04-22 22:43:44 +02:00
Fu Hanxi
74843a442b fix: component manager load all component dirs even set(COMPONENTS ...) 2024-03-19 19:52:20 +08:00
Alexey Lapshin
174e9f582b feat(tools): update toolchain version to esp-13.2.0_20240305 2024-03-15 12:35:09 +04:00
wanlei
ee02b71f1c feat(esp32c61): introduce target esp32c61 2024-03-01 21:12:25 +08:00
Alexey Lapshin
04b73368e5 fix(tools): do not use builtin memcpy/memset/strcpy on xtensa chips
Closes https://github.com/espressif/esp-idf/issues/13228
2024-02-27 02:09:54 +08:00
Omar Chebib
f27d65c7bc Merge branch 'contrib/github_pr_12852' into 'master'
cmake: correct the parameter annotation of idf_build_set_property (GitHub PR)

Closes IDFGH-11752

See merge request espressif/esp-idf!28067
2023-12-22 10:41:24 +08:00
Augtons
a8ea638cde
cmake: correct the parameter annotation of idf_build_set_property
The value parameter should be marked as [in] instead of [out], as it is used to set the property value, not to get it.
2023-12-21 18:30:57 +08:00
Ivan Grokhotkov
7265febc31 Merge branch 'bugfix/macos_build_linux_target_misc' into 'master'
Misc fixes for IDF_TARGET=linux on macOS host

See merge request espressif/esp-idf!28015
2023-12-21 17:55:24 +08:00
Mahavir Jain
7fc9b09c34
fix(cmake): for embedded data length use .long attribute
For Linux builds if the embedded data length exceeded 16-bit value then
the build used to fail with following error:

build/x509_crt_bundle.S: Assembler messages:
build/x509_crt_bundle.S:4201: Warning: value 0x1056e truncated to 0x56e

GNU ASM for X86 systems treats .word attribute as of size 2 bytes, this commit
uses .long attribute to take the size to 4 bytes.
2023-12-20 13:59:19 +05:30
Ivan Grokhotkov
b56bb7d8e4
fix(cmake): don't emit section directive when embedding files on host 2023-12-19 23:00:48 +01:00
KonstantinKondrashov
8001fabfbe feat(tools): Improves a cmake message for updating git submodules
Closes https://github.com/espressif/esp-idf/issues/12776
2023-12-12 16:00:04 +08:00
kohait00
9beda4ce48 feat(tools/cmake): Added VERSION argument to the project() macro in cmake
This commit enables the standad VERSION argument for the project() macro
in ESP-IDF. The VERSION argument is compilant with the requirements of
cmake 3.16. This commit also adds new test cases for verifying the
validity of the version argument.

Merges https://github.com/espressif/esp-idf/pull/12461

Co-authored-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2023-12-05 11:29:43 +01:00
wanglei
076aefce74 feat(esp32c5): add esp32c5 target in kconfig and tools 2023-11-28 16:14:17 +08:00
Jakob Hasse
ed5a7dfa82 docs: Added C documentation page
Closes https://github.com/espressif/esp-idf/issues/12439
Closes https://github.com/espressif/esp-idf/issues/12001
2023-11-13 10:47:15 +08:00